Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IHttpExtend

Hierarchy

  • IHttpExtend

Index

Methods

getDefaultHeaders

  • getDefaultHeaders(): Map<string, string>
  • A method for getting all of the default headers provided, the value is a readonly and any modifications done will be ignored. Please use the provider methods for adding them.

    Returns Map<string, string>

getDefaultParams

  • getDefaultParams(): Map<string, string>
  • A method for getting all of the default parameters provided, the value is a readonly and any modifications done will be ignored. Please use the provider methods for adding them.

    Returns Map<string, string>

getPreRequestHandlers

getPreResponseHandlers

provideDefaultHeader

  • provideDefaultHeader(key: string, value: string): void
  • A method for providing a single header which is added to every request.

    Parameters

    • key: string

      the name of the header

    • value: string

      the header's content

    Returns void

provideDefaultHeaders

  • provideDefaultHeaders(headers: object): void
  • A method for providing more than one header which are added to every request.

    Parameters

    • headers: object

      an object with strings as the keys (header name) and strings as values (header content)

      • [key: string]: string

    Returns void

provideDefaultParam

  • provideDefaultParam(key: string, value: string): void
  • A method for providing a single query parameter which is added to every request.

    Parameters

    • key: string

      the name of the query parameter

    • value: string

      the query parameter's content

    Returns void

provideDefaultParams

  • provideDefaultParams(params: object): void
  • A method for providing more than one query parameters which are added to every request.

    Parameters

    • params: object
      • [key: string]: string

    Returns void

providePreRequestHandler

  • Method for providing a function which is called before every request is called out to the final destination. This can be called more than once which means there can be more than one handler. The order provided is the order called. Note: if this handler throws an error when it is executed then the request will be aborted.

    Parameters

    Returns void

providePreResponseHandler

  • Method for providing a function which is called after every response is got from the url and before the result is returned. This can be called more than once which means there can be more than one handler. The order provided is the order called. Note: if this handler throws an error when it is executed then the respone will not be returned

    Parameters

    Returns void

Generated using TypeDoc