Represents an HTTP request context

Constructors

Properties

agent: undefined | Agent | Agent = undefined
body: RequestBody = undefined
headers: {
    [key: string]: string;
} = {}

Type declaration

  • [key: string]: string
httpMethod: HttpMethod

http method

url: URL

Methods

  • Sets a cookie with the name and value. NO check for duplicate cookies is performed

    Parameters

    • name: string
    • value: string

    Returns void

  • Returns {
        [key: string]: string;
    }

    • [key: string]: string
  • Replaces the url set in the constructor with this url.

    Parameters

    • url: string

    Returns void