OAuthUtility.ExecuteRequest Method
OAuthUtility ExecuteRequest Method Nemiro.OAuth
Performs a request.

Namespace: Nemiro.OAuth
Assembly: Nemiro.OAuth (in Nemiro.OAuth.dll) Version: 1.9.4.725 (1.9.4.725)
Syntax

public static RequestResult ExecuteRequest(
	string method = "POST",
	string endpoint = null,
	HttpParameterCollection parameters = null,
	HttpAuthorization authorization = null,
	NameValueCollection headers = null,
	string contentType = null,
	AccessToken accessToken = null
)

Parameters

method (Optional)
Type: System String
HTTP Method: POST (default), PUT, GET or DELETE.
endpoint (Optional)
Type: System String
URL to which will be sent to request.
parameters (Optional)
Type: Nemiro.OAuth HttpParameterCollection
Parameters to be passed to request.
authorization (Optional)
Type: Nemiro.OAuth HttpAuthorization
Authorization header value.
headers (Optional)
Type: System.Collections.Specialized NameValueCollection
HTTP headers for web request.
contentType (Optional)
Type: System String
The value of the Content-Type HTTP header.
accessToken (Optional)
Type: Nemiro.OAuth AccessToken
Access token to be used in the request.

Return Value

Type: RequestResult
Returns an instance of the RequestResult class, which contains the result of the request.
Exceptions

ExceptionCondition
ArgumentNullException
RequestException
ArgumentException

The exception occurs when the query parameters are specified at the same time authorization and accessToken.

Remarks

Can not be used simultaneously accessToken and authorization. Use only one of these parameters.

See Also