Show / Hide Table of Contents

Class HttpExtenstions

Extension methods to HttpRequestMessage and HttpResponseMessage.

Inheritance
object
HttpExtenstions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Http
Assembly: Google.Apis.Core.dll
Syntax
public static class HttpExtenstions

Methods

SetEmptyContent(HttpRequestMessage)

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

Declaration
public static HttpContent SetEmptyContent(this HttpRequestMessage request)
Parameters
Type Name Description
HttpRequestMessage request
Returns
Type Description
HttpContent

ToDelegatingHandler(IHttpExecuteInterceptor)

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.

Declaration
public static DelegatingHandler ToDelegatingHandler(this IHttpExecuteInterceptor interceptor)
Parameters
Type Name Description
IHttpExecuteInterceptor interceptor

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)

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

Declaration
public static DelegatingHandler ToDelegatingHandler(this IHttpExecuteInterceptor interceptor, HttpMessageHandler innerHandler)
Parameters
Type Name Description
IHttpExecuteInterceptor interceptor

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

HttpMessageHandler innerHandler

The initial inner handler.

Returns
Type Description
DelegatingHandler

A delegating HTTP message handler.

In this article
Back to top Generated by DocFX