OAuthUtility ExecuteRequestAsync Method Nemiro.OAuth
Performs an async request.

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

public static void ExecuteRequestAsync(
	string method = "POST",
	string endpoint = null,
	HttpParameterCollection parameters = null,
	HttpAuthorization authorization = null,
	NameValueCollection headers = null,
	string contentType = null,
	AccessToken accessToken = null,
	ExecuteRequestAsyncCallback callback = 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 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.
callback (Optional)
Type: Nemiro.OAuth ExecuteRequestAsyncCallback
A delegate that, if provided, is called when an async web request is completed.

Return Value

Type:
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