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
Http Http method to use |
Api Api |
System. Actual API call to issue |
System. Optional body of the request |
Dictionary<System. Optional headers for the request |
ApiRequest(ApiRequestType, String)
Creates an API request to execute
Declaration
public ApiRequest(ApiRequestType type, string request)
Parameters
Api Api |
System. 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.
|
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.
|
HttpMethod
The Http method to use
Declaration
public HttpMethod HttpMethod { get; set; }
Property Value
Http
|
Request
The REST/Graph API call to execute
Declaration
public string Request { get; set; }
Property Value
System.
|
Type
The type of API call to execute
Declaration
public ApiRequestType Type { get; set; }