1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public static class HttpExtenstions

Extension methods to [HttpRequestMessage](https://learn.microsoft.com/dotnet/api/system.net.http.httprequestmessage) and
[HttpResponseMessage](https://learn.microsoft.com/dotnet/api/system.net.http.httpresponsemessage).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> HttpExtenstions

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Apis.Http](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.md.txt)

## 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](https://learn.microsoft.com/dotnet/api/system.net.http.delegatinghandler) which applies the execution interceptor
in `interceptor` (usually a credential) before delegating onwards.
The [InnerHandler](https://learn.microsoft.com/dotnet/api/system.net.http.delegatinghandler.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](https://learn.microsoft.com/dotnet/api/system.net.http.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. |