UNPKG

@saysimple/node-sdk

Version:

The official SaySimple Node SDK. Want to use our awesome customer conversations platform? Please visit: https://saysimple.com

21 lines (20 loc) 807 B
import { Method } from "axios"; import { Response } from "./response"; import { HttpClientInterface } from "../types/base/http-client-interface"; import { AuthorizationInterface } from "../types/base/authorization-interface"; export declare class HttpClient implements HttpClientInterface { private client; private readonly authorizer?; constructor(options?: HttpClientOptions, authorizer?: AuthorizationInterface); get<T>(url: string, data?: unknown): Promise<Response<T>>; post<T>(url: string, data?: unknown): Promise<Response<T>>; request<T>(httpMethod: Method, url: string, data?: unknown): Promise<Response<T>>; private dataAsQueryString; } interface HttpClientOptions { baseUrl?: string; headers?: { [name: string]: string | undefined; }; } export {};