Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for classes that provide an adapter to an HTTP client implementation.

Type parameters

  • R

Hierarchy

  • HttpAdapter

Index

Methods

delete

  • delete(url: string, params?: undefined | object, headers?: undefined | object): Promise<R>
  • Executes an HTTP GET request.

    Parameters

    • url: string

      the URL.

    • Optional params: undefined | object

      the request query parameters, if any.uest headers, if any.

    • Optional headers: undefined | object

      the HTTP req

    Returns Promise<R>

    the HTTP response body.

get

  • get(url: string, params?: undefined | object, headers?: undefined | object): Promise<R>
  • Executes an HTTP GET request.

    Parameters

    • url: string

      the URL.

    • Optional params: undefined | object

      the request query parameters, if any.

    • Optional headers: undefined | object

      the HTTP request headers, if any.

    Returns Promise<R>

    the HTTP response body.

map

  • map<T>(response: Promise<R>): Promise<T>
  • Maps an HTTP response body onto a JSON type.

    Type parameters

    • T

    Parameters

    • response: Promise<R>

      the HTTP response object.

    Returns Promise<T>

    the HTTP response body.

mapBinary

  • mapBinary(response: Promise<R>): Promise<ArrayBuffer>
  • Maps an HTTP response body onto raw, binary data.

    Parameters

    • response: Promise<R>

      the HTTP response object.

    Returns Promise<ArrayBuffer>

    the HTTP response body.

mapText

  • mapText(response: Promise<R>): Promise<string>
  • Maps an HTTP response body onto plain text.

    Parameters

    • response: Promise<R>

      the HTTP response object.

    Returns Promise<string>

    the HTTP response body.

post

  • post(url: string, body?: any, params?: undefined | object, headers?: undefined | object): Promise<R>
  • Executes an HTTP POST request.

    Parameters

    • url: string

      the URL.

    • Optional body: any

      the HTTP request body.

    • Optional params: undefined | object

      the request query parameters, if any.

    • Optional headers: undefined | object

      the HTTP request headers, if any.

    Returns Promise<R>

    the HTTP response body.

put

  • put(url: string, body?: any, params?: undefined | object, headers?: undefined | object): Promise<R>
  • Executes an HTTP PUT request.

    Parameters

    • url: string

      the URL.

    • Optional body: any

      the HTTP request body.

    • Optional params: undefined | object

      the request query parameters, if any.

    • Optional headers: undefined | object

      the HTTP request headers, if any.

    Returns Promise<R>

    the HTTP response body.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc