Class HttpExtenstions (1.68.0)

public static class HttpExtenstions

Extension methods to HttpRequestMessage and HttpResponseMessage.

Inheritance

object > HttpExtenstions

Namespace

Google.Apis.Http

Assembly

Google.Apis.Core.dll

Methods

SetEmptyContent(HttpRequestMessage)

public static HttpContent SetEmptyContent(this HttpRequestMessage request)

A Google.Apis utility method for setting an empty HTTP content.

Parameter
Name Description
request HttpRequestMessage
Returns
Type Description
HttpContent

ToDelegatingHandler(IHttpExecuteInterceptor)

public static DelegatingHandler ToDelegatingHandler(this IHttpExecuteInterceptor interceptor)

Creates a DelegatingHandler which applies the execution interceptor in interceptor (usually a credential) before delegating onwards. The InnerHandler of the returned handler must be specified before the first request is made.

Parameter
Name Description
interceptor IHttpExecuteInterceptor

The interceptor to execute before the remainder of the handler chain. Must not be null.

Returns
Type Description
DelegatingHandler

A delegating HTTP message handler.

ToDelegatingHandler(IHttpExecuteInterceptor, HttpMessageHandler)

public static DelegatingHandler ToDelegatingHandler(this IHttpExecuteInterceptor interceptor, HttpMessageHandler innerHandler)

Creates a DelegatingHandler which applies the execution interceptor in interceptor (usually a credential) before delegating onwards.

Parameters
Name Description
interceptor IHttpExecuteInterceptor

The interceptor to execute before the remainder of the handler chain. Must not be null.

innerHandler HttpMessageHandler

The initial inner handler.

Returns
Type Description
DelegatingHandler

A delegating HTTP message handler.