Module: models/http/httpProxy

The proxy implementation for http/s imposters

Source:

Methods

to(proxyDestination, originalRequest, options) → {Object}

Proxies an http/s request to a destination

Parameters:
Name Type Description
proxyDestination string

The base URL to proxy to, without a path (e.g. http://www.google.com)

originalRequest Object

The original http/s request to forward on to proxyDestination

options Object

Proxy options

Properties
Name Type Attributes Description
cert string <optional>

The certificate, in case the destination requires mutual authentication

key string <optional>

The private key, in case the destination requires mutual authentication

Source:
Returns:
  • Promise resolving to the response
Type
Object

(inner) create(logger) → {Object}

Creates the proxy

Parameters:
Name Type Description
logger Object

The logger

Source:
Returns:
Type
Object