Class ApiResponse

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

Hierarchy

  • ApiResponse

Index

Constructors

constructor

  • new ApiResponse(headers: Map<string, string>, body: string, responseText: string, status: number, statusText: string): ApiResponse
  • 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

body

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

    Returns string

contentType

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

    Returns string

eTag

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

    Returns string

headers

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

    Returns Map<string, string>

responseText

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

    Returns string

status

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

    Returns number

statusText

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

    Returns string

Methods

getHeader

  • getHeader(headerName: string): string
  • Gets a header of the response with the provided name.

    Parameters

    • headerName: string

      The name of the header to retrieve.

    Returns string