Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ProxyRequest

Handles the interoperability of the request between the user agent and the origin.

Hierarchy

  • ProxyRequest

Index

Methods

absoluteURI

  • absoluteURI(): string
  • Returns string

getAuthority

  • getAuthority(): string
  • Returns string

getBody

  • Returns Body

getMethod

  • getMethod(): HttpMethod
  • Returns HttpMethod

getURI

  • getURI(): string
  • Returns string

headers

  • headers(): MultiMap
  • Returns MultiMap

proxiedRequest

  • proxiedRequest(): HttpServerRequest
  • Returns HttpServerRequest

proxy

  • proxy(request: HttpClientRequest): PromiseLike<void>
  • Proxy this request to the origin server using the specified request and then send the proxy response.

    Parameters

    • request: HttpClientRequest

    Returns PromiseLike<void>

release

  • Release the proxy request and its associated resources

    The HTTP server request is resumed, no HTTP server response is sent.

    Returns ProxyRequest

response

  • Create and return the proxy response.

    Returns ProxyResponse

send

  • Send this request to the origin server using the specified request.

    The returned future will be completed with the proxy response returned by the origin.

    Parameters

    • request: HttpClientRequest

    Returns PromiseLike<ProxyResponse>

setAuthority

  • Set the request authority

    • for HTTP/1 the header
    • for HTTP/2 the pseudo header

    The value must follow the syntax.

    Parameters

    • authority: string

    Returns ProxyRequest

setBody

  • Set the request body to be sent to the origin server.

    The initial request body value is the proxied request body.

    Parameters

    Returns ProxyRequest

setMethod

  • Set the HTTP method to be sent to the origin server.

    The initial HTTP method value is the proxied request HTTP method.

    Parameters

    • method: HttpMethod

    Returns ProxyRequest

setURI

  • Set the request URI to be sent to the origin server.

    The initial request URI value is the proxied request URI.

    Parameters

    • uri: string

    Returns ProxyRequest

version

  • version(): HttpVersion
  • Returns HttpVersion

Static reverseProxy

  • reverseProxy(proxiedRequest: HttpServerRequest): ProxyRequest
  • Create a new ProxyRequest instance, the proxied request will be paused.

    Parameters

    • proxiedRequest: HttpServerRequest

    Returns ProxyRequest

Generated using TypeDoc