@cosmosapp/pay_sdkDefiniçõesWeb

WebREST

The browser-side HTTP layer the web client uses to talk to the Cosmos Pay gateway.

The browser-side HTTP layer the web client uses to talk to the Cosmos Pay gateway.

Constructor

WebREST

constructor(options: WebRESTOptions)

Parameters

  • options: WebRESTOptions

Properties

baseURL

baseURL: string

version

readonly version: string

Methods

setApiKey()

setApiKey(apiKey: string): this

Parameters

  • apiKey: string

Returns this

get()

get<T>(path: string, options?: WebRequestOptions): Promise<T>

Parameters

  • path: string
  • options (optional): WebRequestOptions

Returns Promise<T>

post()

post<T>(path: string, options?: WebRequestOptions): Promise<T>

Parameters

  • path: string
  • options (optional): WebRequestOptions

Returns Promise<T>

patch()

patch<T>(path: string, options?: WebRequestOptions): Promise<T>

Parameters

  • path: string
  • options (optional): WebRequestOptions

Returns Promise<T>

request()

request<T>(method: string, path: string, options?: WebRequestOptions): Promise<T>

Parameters

  • method: string
  • path: string
  • options (optional): WebRequestOptions

Returns Promise<T>

Nesta página