Class ApiRequest
Defines an API request that can be executed
Inheritance
System.Object
ApiRequest
Namespace: PnP.Core.Services
Assembly: PnP.Core.dll
Syntax
public class ApiRequest : object
Constructors
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 |
System.String
request
Actual API call to issue |
System.String
body
Optional body of the request |
Dictionary<System.String, System.String>
headers
Optional headers for the request |
ApiRequest(ApiRequestType, String)
Creates an API request to execute
Declaration
public ApiRequest(ApiRequestType type, string request)
Parameters
ApiRequestType
type
ApiRequestType of the request |
System.String
request
Actual API call to issue |
Properties
Body
The optional payload/body of the API call to execute
Declaration
public string Body { get; set; }
Property Value
System.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<System.String, System.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
System.String
|
Type
The type of API call to execute
Declaration
public ApiRequestType Type { get; set; }
Property Value
ApiRequestType
|