Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
class RestClient
import { RestClient } from "https://deno.land/x/cdek@v1.0.12/src/core/restclient.ts";

Constructors

new
RestClient(options: InitOptions)

Properties

private
optional
_token: ApiResponse.OAuth
private
optional
_token_expire: number
private
account: string
private
grant_type: string
private
optional
on_error: (error: ) => void | Promise<void>
private
password: string
private
url_base: string
readonly
token
readonly
token_expire

Methods

private
params(query: Record<string, any>): URLSearchParams
private
request<T>(init: RequestInit & { method: RequestMethod; }): Promise<T>
auth(): Promise<void>
delete<T>(init: RequestInit): Promise<T>
get<T>(init: RequestInit): Promise<T>
patch<T>(init: RequestInit): Promise<T>
post<T>(init: RequestInit): Promise<T>
put<T>(init: RequestInit): Promise<T>