Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HttpClient

HTTP client used to communicate with remote resources.

Hierarchy

  • HttpClient

Implemented by

Index

Properties

Methods

Properties

defaultHeaders

defaultHeaders: Headers

Default HTTP headers to set for requests when not explicitly overridden.

Methods

send

  • send(uri: URL, method: HttpMethod, signal?: AbortSignal, headers?: HeadersInit, body?: BodyInit): Promise<Response>
  • Sends an HTTP request.

    Parameters

    • uri: URL

      The URI to send the message to.

    • method: HttpMethod

      The HTTP method to use.

    • Optional signal: AbortSignal

      Used to cancel the request.

    • Optional headers: HeadersInit

      The HTTP headers to set.

    • Optional body: BodyInit

      The body to send.

    Returns Promise<Response>

Generated using TypeDoc