Home Reference Source
public class | source

Http

An generic HTTP client

Static Method Summary

Static Private Methods
private static

Constructor Summary

Public Constructor
public

constructor(baseURL: *)

Creates your Http client

Member Summary

Private Members
private

Method Summary

Public Methods
public

async delete(url: string): *

Delete Method

public

async get(url: string): Promise

Get Method

public

async post(url: string, payload: undefined): Promise

Post Method

public

async put(url: string, payload: undefined): Promise

Put Method

Static Private Methods

private static _getErrorResponse(error: undefined): HttpResponse source

Params:

NameTypeAttributeDescription
error undefined

Return:

HttpResponse

Public Constructors

public constructor(baseURL: *) source

Creates your Http client

Params:

NameTypeAttributeDescription
baseURL *

The baseUrl, i.e host url

Private Members

private _clientImpl: * source

Public Methods

public async delete(url: string): * source

Delete Method

Params:

NameTypeAttributeDescription
url string

Return:

*

public async get(url: string): Promise source

Get Method

Params:

NameTypeAttributeDescription
url string

Return:

Promise

public async post(url: string, payload: undefined): Promise source

Post Method

Params:

NameTypeAttributeDescription
url string
payload undefined

Return:

Promise

public async put(url: string, payload: undefined): Promise source

Put Method

Params:

NameTypeAttributeDescription
url string
payload undefined

Return:

Promise