Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ProxyRouteConfig

Hierarchy

  • ProxyRouteConfig

Index

Properties

Optional additionalHeaders

additionalHeaders: {}

Optional additional headers to send with the request.

Type declaration

  • [key: string]: string

Optional bodyMapper

bodyMapper: (reqBody: any) => Promise<any> | any

Optional mapper function to alter the request body (if any) before sending the request. Can return undefined to not send a body.

Type declaration

    • (reqBody: any): Promise<any> | any
    • Parameters

      • reqBody: any

      Returns Promise<any> | any

destPath

destPath: string

The destination to proxy to.

Optional requestMapper

requestMapper: (reqArgs: ClientRequestArgs) => Promise<ClientRequestArgs | null> | ClientRequestArgs | null

Optional mapper function to alter the ClientRequestArgs before sending it. Can return the altered ClientRequestArgs or a Promise resolving to a ClientRequestArgs to continue with the request. Can return null or a Promise resolving to null to cancel the request.

Type declaration

    • (reqArgs: ClientRequestArgs): Promise<ClientRequestArgs | null> | ClientRequestArgs | null
    • Parameters

      • reqArgs: ClientRequestArgs

      Returns Promise<ClientRequestArgs | null> | ClientRequestArgs | null

srcPath

srcPath: string

The root of the REST path to start proxying.

Generated using TypeDoc