UNPKG

@wocker/ws

Version:

Docker workspace for web projects

19 lines (18 loc) 607 B
import { AxiosHeaders, AxiosResponse } from "axios"; type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; export declare class Http { readonly method: HttpMethod; readonly url: string; body?: any; protected headers: AxiosHeaders; private constructor(); withHeader(name: string, value: string): Http; withBody(body: any): Http; send(path: string): Promise<AxiosResponse>; static get(url: string): Http; static post(url: string): Http; static put(url: string): Http; static patch(url: string): Http; static delete(url: string): Http; } export {};