Skip to main content

@auvious/common / Postman

Class: Postman

Table of contents​

Constructors​

Properties​

Accessors​

Methods​

Constructors​

constructor​

• new Postman(config?): Postman

Parameters​

NameType
configany

Returns​

Postman

Properties​

_csrfToken​

• Private _csrfToken: string


_http​

• Private _http: AxiosInstance


_refreshRequested​

• Private _refreshRequested: any


_refreshTokenExpired​

• Private _refreshTokenExpired: any


DELETE​

▪ Static DELETE: string = "delete"


GET​

▪ Static GET: string = "get"


POST​

▪ Static POST: string = "post"


PUT​

▪ Static PUT: string = "put"


csrfAppCookieName​

▪ Static csrfAppCookieName: string = "X-AUVIOUS-COOKIE"


csrfCookieName​

▪ Static csrfCookieName: string = "CSRF-TOKEN"


csrfHeaderName​

▪ Static csrfHeaderName: string = "X-CSRF-TOKEN"

Accessors​

csrfCookie​

• get csrfCookie(): string

Returns​

string


csrfToken​

• get csrfToken(): string

Returns​

string

Methods​

appendCsrfHeaders​

▸ appendCsrfHeaders(config): void

set csrf related headers manually when document is not available current platform.

Parameters​

NameType
configany

Returns​

void


post​

▸ post(url, body, config?): Promise<any>

Parameters​

NameType
urlstring
bodyany
configany

Returns​

Promise<any>


request​

▸ request(config?): Promise<any>

Parameters​

NameType
configAxiosRequestConfig<any>

Returns​

Promise<any>