Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to prepare http response object

Hierarchy

  • HttpResponse

Index

Constructors

Properties

Accessors

Methods

Constructors

  • constructor to initialise the data members for http response object

    Parameters

    • resp: Response

      Response object from the http request

    • text: any

      text for the status response

      @example
      httpResponse = new HttpRespose(resp, 'Ok')

    Returns HttpResponse

Properties

body: any
headers?: HttpHeader[]
status: number
statusText: string

Accessors

  • get data(): any
  • methohd to parse the http response into a json onbject

    @example
    const dataResponse = this.data()

    Returns any

Methods

  • toString(): string
  • Method to return string response from a method call

    Returns string

    • stringfied values for a http response
    @example
    const responseString = this.string();

Generated using TypeDoc