MethodInvocationSendTResponse, TRequest Method (HttpClient, String, HttpMethod, String, TRequest, String) |
Sends a message to the specified HTTP client.
Namespace: DocuWare.Services.Http.ClientAssembly: DocuWare.RestClient (in DocuWare.RestClient.dll) Version: Version 6.7 [UNOFFICIAL BUILD]
Syntax public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(
this HttpClient httpClient,
string uri,
HttpMethod method,
string requestContentType,
TRequest dataToSend,
string acceptType
)
where TResponse : class
where TRequest : class
Parameters
- httpClient
- Type: System.Net.HttpHttpClient
The HTTP client. - uri
- Type: SystemString
The URI. - method
- Type: System.Net.HttpHttpMethod
The method. - requestContentType
- Type: SystemString
Type of the request content. - dataToSend
- Type: TRequest
The data to send. - acceptType
- Type: SystemString
Type of the accept.
Type Parameters
- TResponse
- The type of the response.
- TRequest
- The type of the request.
Return Value
Type:
TaskDeserializedHttpResponseTResponseA task executing the request and returning the response.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
HttpClient. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also