Show / Hide Table of Contents

Class MaxUrlLengthInterceptor

Intercepts HTTP GET requests with a URLs longer than a specified maximum number of characters. The interceptor will change such requests as follows:

  • The request's method will be changed to POST
  • A X-HTTP-Method-Override header will be added with the value GET
  • Any query parameters from the URI will be moved into the body of the request.
  • If query parameters are moved, the content type is set to application/x-www-form-urlencoded
Inheritance
object
MaxUrlLengthInterceptor
Implements
IHttpExecuteInterceptor
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 class MaxUrlLengthInterceptor : IHttpExecuteInterceptor

Constructors

MaxUrlLengthInterceptor(uint)

Constructs a new Max URL length interceptor with the given max length.

Declaration
public MaxUrlLengthInterceptor(uint maxUrlLength)
Parameters
Type Name Description
uint maxUrlLength

Methods

InterceptAsync(HttpRequestMessage, CancellationToken)

Invoked before the request is being sent.
Declaration
public Task InterceptAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequestMessage request

The HTTP request message.

CancellationToken cancellationToken

Cancellation token to cancel the operation.

Returns
Type Description
Task

Implements

IHttpExecuteInterceptor

Extension Methods

HttpExtenstions.ToDelegatingHandler(IHttpExecuteInterceptor)
HttpExtenstions.ToDelegatingHandler(IHttpExecuteInterceptor, HttpMessageHandler)
Utilities.ThrowIfNull<T>(T, string)
In this article
Back to top Generated by DocFX