Skip to main content

Postman

@auvious/common / Exports / Postman

Class: Postman

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Postman(config?)

Parameters

NameType
configany

Properties

_csrfToken

Private _csrfToken: string


_http

Private _http: AxiosInstance


_refreshRequested

Private _refreshRequested: any


_refreshTokenExpired

Private _refreshTokenExpired: any


_tokenIsExpired

Private _tokenIsExpired: any


_tokenRefreshRoute

Private _tokenRefreshRoute: string


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

Protected appendCsrfHeaders(config): void

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

Parameters

NameType
configany

Returns

void


delete

delete(url, config?): Promise<any>

Parameters

NameType
urlstring
configany

Returns

Promise<any>


get

get(url, config?): Promise<any>

Parameters

NameType
urlstring
configany

Returns

Promise<any>


post

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

Parameters

NameType
urlstring
bodyany
configany

Returns

Promise<any>


put

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

Parameters

NameType
urlstring
bodyany
configany

Returns

Promise<any>


request

request(config?): Promise<any>

Parameters

NameType
configAxiosRequestConfig

Returns

Promise<any>