An interface describing an HTTP request to be sent.

Hierarchy

  • HttpRequest

Methods

  • Sets a header.

    Parameters

    • name: string

      The name for the header.

    • value: string

      The value for the header.

    Returns HttpRequest

    This HTTP request object.

  • Adds a query parameter. Should do nothing if the value is undefined.

    Parameters

    • name: string

      The name for the query parameter.

    • Optional value: string | number | boolean

      The value for the query parameter.

    Returns HttpRequest

    This HTTP request object.

  • Adds several query parameters with the same name. Should do nothing if the value is undefined.

    Parameters

    • name: string

      The name for each of the query parameters.

    • Optional values: string[] | number[] | boolean[]

      The values for the query parameters.

    Returns HttpRequest

    This HTTP request object.

  • Sends the HTTP request.

    Returns Promise<HttpResponse>

    A promise that contains the HTTP response.