Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultHttpClient

The DefaultHttpClient is responsible of performing the actual HTTP calls transforming the parameters into an actual HTTP request and turning back the HTTP response into a return value.

All methods are asynchronous and returns a response object when successufl and throws a DfuseError when an error is encountered.

Hierarchy

  • DefaultHttpClient

Index

Constructors

Properties

Methods

Constructors

constructor

  • new DefaultHttpClient(authUrl: string, apiUrl: string, fetch: Fetch): DefaultHttpClient

Properties

Protected apiUrl

apiUrl: string

Protected authUrl

authUrl: string

Protected fetch

fetch: Fetch

Methods

apiRequest

  • apiRequest<T>(apiToken: string | undefined, path: string, method: string, params?: HttpQueryParameters, body?: any, headers?: HttpHeaders): Promise<T>

authRequest

release

  • release(): void

Generated using TypeDoc