Class ApiRequest
Defines an API request that can be executed
Inherited Members
Namespace: PnP.Core.Services
Assembly: PnP.Core.dll
Syntax
public class ApiRequest
Constructors
ApiRequest(ApiRequestType, string)
Creates an API request to execute
Declaration
public ApiRequest(ApiRequestType type, string request)
Parameters
|
ApiRequestType
type
ApiRequestType of the request |
|
string
request
Actual API call to issue |
ApiRequest(HttpMethod, ApiRequestType, string, string, Dictionary<string, string>)
Creates an API request to execute
Declaration
public ApiRequest(HttpMethod httpMethod, ApiRequestType type, string request, string body, Dictionary<string, string> headers = null)
Parameters
|
HttpMethod
httpMethod
Http method to use |
|
ApiRequestType
type
ApiRequestType of the request |
|
string
request
Actual API call to issue |
|
string
body
Optional body of the request |
|
Dictionary<string, string>
headers
Optional headers for the request |
Properties
Body
The optional payload/body of the API call to execute
Declaration
public string Body { get; set; }
Property Value
| string |
Headers
The optional headers of the API call to execute - for example IF-Match for PATCH Request.
Declaration
public Dictionary<string, string> Headers { get; }
Property Value
| Dictionary<string, string> |
HttpMethod
The Http method to use
Declaration
public HttpMethod HttpMethod { get; set; }
Property Value
| HttpMethod |
Request
The REST/Graph API call to execute
Declaration
public string Request { get; set; }
Property Value
| string |
Type
The type of API call to execute
Declaration
public ApiRequestType Type { get; set; }
Property Value
| ApiRequestType |