Class ApiRequest
Defines an API request that can be executed
public class ApiRequest
- Inheritance
-
ApiRequest
- Inherited Members
Constructors
ApiRequest(ApiRequestType, string)
Creates an API request to execute
public ApiRequest(ApiRequestType type, string request)
Parameters
typeApiRequestTypeApiRequestType of the request
requeststringActual API call to issue
ApiRequest(HttpMethod, ApiRequestType, string, string, Dictionary<string, string>)
Creates an API request to execute
public ApiRequest(HttpMethod httpMethod, ApiRequestType type, string request, string body, Dictionary<string, string> headers = null)
Parameters
httpMethodHttpMethodHttp method to use
typeApiRequestTypeApiRequestType of the request
requeststringActual API call to issue
bodystringOptional body of the request
headersDictionary<string, string>Optional headers for the request
Properties
Body
The optional payload/body of the API call to execute
public string Body { get; set; }
Property Value
Headers
The optional headers of the API call to execute - for example IF-Match for PATCH Request.
public Dictionary<string, string> Headers { get; }
Property Value
HttpMethod
The Http method to use
public HttpMethod HttpMethod { get; set; }
Property Value
Request
The REST/Graph API call to execute
public string Request { get; set; }
Property Value
Type
The type of API call to execute
public ApiRequestType Type { get; set; }