A response received from a request sent to the DriveWorks Integration Theme.

Hierarchy

  • ApiResponse

Constructors

  • Creates a new ApiResponse.

    Parameters

    • headers: Map<string, string>

      A map of response header names and their values.

    • body: string

      The body of the response.

    • responseText: string

      The text of the response.

    • status: number

      The status code of the response.

    • statusText: string

      The status text of the response.

    Returns ApiResponse

Accessors

  • get body(): string
  • Gets the body of the response.

    Returns string

  • get contentType(): undefined | string
  • Gets the content type of the response.

    Returns undefined | string

  • get eTag(): undefined | string
  • Gets the ETag of the response.

    Returns undefined | string

  • get headers(): Map<string, string>
  • Gets all of the headers of the response.

    Returns Map<string, string>

  • get responseText(): string
  • Gets the response text of the response.

    Returns string

  • get status(): number
  • Gets the status code of the response.

    Returns number

  • get statusText(): string
  • Gets the status text of the response.

    Returns string

Methods

  • Gets a header of the response with the provided name.

    Parameters

    • headerName: string

      The name of the header to retrieve.

    Returns undefined | string