Table of Contents

Class MethodInvocation

Namespace
DocuWare.Services.Http.Client
Assembly
DocuWare.RestClient.dll

Helpers for calling HTTP methods.

public static class MethodInvocation
Inheritance
MethodInvocation
Inherited Members

Methods

CreateDeserializedResponse<TResponse>(Task<HttpResponseMessage>)

Creates the deserialized response.

public static Task<DeserializedHttpResponse<TResponse>> CreateDeserializedResponse<TResponse>(this Task<HttpResponseMessage> response)
    where TResponse : class

Parameters

TypeNameDescription
Task<HttpResponseMessage>response

The response.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

CreateDeserializedResponse<TResponse>(Task<HttpResponseMessage>, HttpClientProxy)

Creates the deserialized response.

public static Task<DeserializedHttpResponse<TResponse>> CreateDeserializedResponse<TResponse>(this Task<HttpResponseMessage> response, HttpClientProxy proxy)
    where TResponse : class

Parameters

TypeNameDescription
Task<HttpResponseMessage>response

The response.

HttpClientProxyproxy

The proxy.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

CreateMessageBody<TRequest>(TRequest, String)

Creates the message body.

public static HttpContent CreateMessageBody<TRequest>(TRequest dataToSend, string requestContentType)
    where TRequest : class

Parameters

TypeNameDescription
TRequestdataToSend

The data to send.

StringrequestContentType

Type of the request content.

Returns

TypeDescription
HttpContent

Type Parameters

NameDescription
TRequest

The type of the request.

Delete<TResponse>(IRelations, HttpClient, String, String[])

Sends a HTTP DELETE message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Delete<TResponse>(this IRelations relations, HttpClient httpClient, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpClienthttpClient

The HTTP client.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Delete<TResponse>(IRelations, HttpClient, CancellationToken, String, String[])

Sends a HTTP DELETE message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Delete<TResponse>(this IRelations relations, HttpClient httpClient, CancellationToken cancellationToken, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpClienthttpClient

The HTTP client.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Delete<TResponse>(IRelationsWithProxy, String, String[])

Sends a HTTP DELETE message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Delete<TResponse>(this IRelationsWithProxy relations, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Delete<TResponse>(IRelationsWithProxy, CancellationToken, String, String[])

Sends a HTTP DELETE message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Delete<TResponse>(this IRelationsWithProxy relations, CancellationToken cancellationToken, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Get<TResponse>(IRelations, HttpClient, String, String[])

Sends a HTTP GET message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Get<TResponse>(this IRelations relations, HttpClient httpClient, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpClienthttpClient

The HTTP client.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Get<TResponse>(IRelations, HttpClient, CancellationToken, String, String[])

Sends a HTTP GET message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Get<TResponse>(this IRelations relations, HttpClient httpClient, CancellationToken cancellationToken, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpClienthttpClient

The HTTP client.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Get<TResponse>(IRelationsWithProxy, String, String[])

Sends a HTTP GET message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Get<TResponse>(this IRelationsWithProxy relations, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Get<TResponse>(IRelationsWithProxy, CancellationToken, String, String[])

Sends a HTTP GET message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Get<TResponse>(this IRelationsWithProxy relations, CancellationToken cancellationToken, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(HttpClientProxy, String, HttpMethod, HttpContent, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this HttpClientProxy httpClientProxy, string uri, HttpMethod method, HttpContent dataToSend, string acceptType)
    where TResponse : class

Parameters

TypeNameDescription
HttpClientProxyhttpClientProxy

The HTTP client proxy.

Stringuri

The URI.

HttpMethodmethod

The method.

HttpContentdataToSend

The content to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(HttpClientProxy, String, HttpMethod, String[])

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this HttpClientProxy httpClientProxy, string url, HttpMethod method, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
HttpClientProxyhttpClientProxy

The HTTP client proxy.

Stringurl

The url.

HttpMethodmethod

The method.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(HttpClientProxy, CancellationToken, String, HttpMethod, HttpContent, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this HttpClientProxy httpClientProxy, CancellationToken cancellationToken, string uri, HttpMethod method, HttpContent dataToSend, string acceptType)
    where TResponse : class

Parameters

TypeNameDescription
HttpClientProxyhttpClientProxy

The HTTP client proxy.

CancellationTokencancellationToken

The cancellation token.

Stringuri

The URI.

HttpMethodmethod

The method.

HttpContentdataToSend

The content to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(HttpClientProxy, CancellationToken, String, HttpMethod, String[])

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this HttpClientProxy httpClientProxy, CancellationToken cancellationToken, string url, HttpMethod method, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
HttpClientProxyhttpClientProxy

The HTTP client proxy.

CancellationTokencancellationToken

The cancellation token.

Stringurl

The url.

HttpMethodmethod

The method.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(IRelations, HttpMethod, HttpClient, String, String[])

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this IRelations relations, HttpMethod method, HttpClient httpClient, string relationName, string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpMethodmethod

The method.

HttpClienthttpClient

The HTTP client.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(IRelations, CancellationToken, HttpMethod, HttpClient, String, String[])

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this IRelations relations, CancellationToken cancellationToken, HttpMethod method, HttpClient httpClient, string relationName, string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

CancellationTokencancellationToken

The cancellation token.

HttpMethodmethod

The method.

HttpClienthttpClient

The HTTP client.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(IRelationsWithProxy, HttpMethod, String, String[])

Sends a message to the specified proxy.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this IRelationsWithProxy relations, HttpMethod method, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

HttpMethodmethod

The method.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(IRelationsWithProxy, String, HttpMethod, HttpContent, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this IRelationsWithProxy relations, string relationName, HttpMethod method, HttpContent dataToSend, string acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

StringrelationName

Name of the relation.

HttpMethodmethod

The method.

HttpContentdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(IRelationsWithProxy, CancellationToken, HttpMethod, String, String[])

Sends a message to the specified proxy.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this IRelationsWithProxy relations, CancellationToken cancellationToken, HttpMethod method, string relationName, params string[] acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

CancellationTokencancellationToken

The cancellation token.

HttpMethodmethod

The method.

StringrelationName

Name of the relation.

String[]acceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse>(IRelationsWithProxy, CancellationToken, String, HttpMethod, HttpContent, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse>(this IRelationsWithProxy relations, CancellationToken cancellationToken, string relationName, HttpMethod method, HttpContent dataToSend, string acceptType)
    where TResponse : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

HttpMethodmethod

The method.

HttpContentdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

Send<TResponse, TRequest>(HttpClientProxy, String, HttpMethod, String, TRequest, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(this HttpClientProxy httpClientProxy, string uri, HttpMethod method, string requestContentType, TRequest dataToSend, string acceptType)
    where TResponse : class where TRequest : class

Parameters

TypeNameDescription
HttpClientProxyhttpClientProxy

The HTTP client proxy.

Stringuri

The URI.

HttpMethodmethod

The method.

StringrequestContentType

Type of the request content.

TRequestdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

TRequest

The type of the request.

Send<TResponse, TRequest>(HttpClientProxy, CancellationToken, String, HttpMethod, String, TRequest, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(this HttpClientProxy httpClientProxy, CancellationToken cancellationToken, string uri, HttpMethod method, string requestContentType, TRequest dataToSend, string acceptType)
    where TResponse : class where TRequest : class

Parameters

TypeNameDescription
HttpClientProxyhttpClientProxy

The HTTP client proxy.

CancellationTokencancellationToken

The cancellation token.

Stringuri

The URI.

HttpMethodmethod

The method.

StringrequestContentType

Type of the request content.

TRequestdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

TRequest

The type of the request.

Send<TResponse, TRequest>(IRelations, HttpClientProxy, String, HttpMethod, String, TRequest, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(this IRelations relations, HttpClientProxy httpClientProxy, string relationName, HttpMethod method, string requestContentType, TRequest dataToSend, string acceptType)
    where TResponse : class where TRequest : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpClientProxyhttpClientProxy

The HTTP client proxy.

StringrelationName

Name of the relation.

HttpMethodmethod

The method.

StringrequestContentType

Type of the request content.

TRequestdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

TRequest

The type of the request.

Send<TResponse, TRequest>(IRelations, HttpClientProxy, CancellationToken, String, HttpMethod, String, TRequest, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(this IRelations relations, HttpClientProxy httpClientProxy, CancellationToken cancellationToken, string relationName, HttpMethod method, string requestContentType, TRequest dataToSend, string acceptType)
    where TResponse : class where TRequest : class

Parameters

TypeNameDescription
IRelationsrelations

The relations.

HttpClientProxyhttpClientProxy

The HTTP client proxy.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

HttpMethodmethod

The method.

StringrequestContentType

Type of the request content.

TRequestdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

TRequest

The type of the request.

Send<TResponse, TRequest>(IRelationsWithProxy, String, HttpMethod, String, TRequest, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(this IRelationsWithProxy relations, string relationName, HttpMethod method, string requestContentType, TRequest dataToSend, string acceptType)
    where TResponse : class where TRequest : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

StringrelationName

Name of the relation.

HttpMethodmethod

The method.

StringrequestContentType

Type of the request content.

TRequestdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

TRequest

The type of the request.

Send<TResponse, TRequest>(IRelationsWithProxy, CancellationToken, String, HttpMethod, String, TRequest, String)

Sends a message to the specified HTTP client.

public static Task<DeserializedHttpResponse<TResponse>> Send<TResponse, TRequest>(this IRelationsWithProxy relations, CancellationToken cancellationToken, string relationName, HttpMethod method, string requestContentType, TRequest dataToSend, string acceptType)
    where TResponse : class where TRequest : class

Parameters

TypeNameDescription
IRelationsWithProxyrelations

The relations.

CancellationTokencancellationToken

The cancellation token.

StringrelationName

Name of the relation.

HttpMethodmethod

The method.

StringrequestContentType

Type of the request content.

TRequestdataToSend

The data to send.

StringacceptType

Type of the accept.

Returns

TypeDescription
Task<DeserializedHttpResponse<TResponse>>

A task executing the request and returning the response.

Type Parameters

NameDescription
TResponse

The type of the response.

TRequest

The type of the request.