@cosmosapp/pay_sdkDefinicionesWeb
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: stringversion
readonly version: stringMethods
setApiKey()
setApiKey(apiKey: string): thisParameters
apiKey:string
Returns this
get()
get<T>(path: string, options?: WebRequestOptions): Promise<T>Parameters
path:stringoptions(optional):WebRequestOptions
Returns Promise<T>
post()
post<T>(path: string, options?: WebRequestOptions): Promise<T>Parameters
path:stringoptions(optional):WebRequestOptions
Returns Promise<T>
patch()
patch<T>(path: string, options?: WebRequestOptions): Promise<T>Parameters
path:stringoptions(optional):WebRequestOptions
Returns Promise<T>
request()
request<T>(method: string, path: string, options?: WebRequestOptions): Promise<T>Parameters
method:stringpath:stringoptions(optional):WebRequestOptions
Returns Promise<T>