Main object for structuring a request.

Hierarchy

  • HttpRequest

Constructors

Properties

body: string

Content of the body of the HTTP request.

headers: HttpHeader[]

A collection of HTTP headers to add to the outbound request.

HTTP method (e.g., GET or PUT or PATCH) to use for making the request.

timeout: number

Amount of time, in seconds, before the request times out and is abandoned.

uri: string

The HTTP resource to access.

Methods

  • Parameters

    • key: string
    • value: string | SecretString

    Returns HttpRequest

    Remarks

    Adds an additional header to the overall list of headers used in the corresponding HTTP request.

  • Parameters

    • body: string

    Returns HttpRequest

    Remarks

    Updates the content of the body of the HTTP request.

  • Parameters

    Returns HttpRequest

    Remarks

    Replaces and applies a set of HTTP Headers for the request.