UNPKG

@nofrills/http

Version:
23 lines 943 B
import 'isomorphic-fetch'; export declare enum HttpMethods { Delete = "DELETE", Get = "GET", Head = "HEAD", Patch = "PATCH", Post = "POST", Put = "PUT" } export declare abstract class HTTP { readonly name: string; protected readonly log: import("@nofrills/scrubs").Lincoln; constructor(name?: string); delete<TResponse>(url: string): Promise<TResponse>; get<TResponse>(url: string): Promise<TResponse>; head<TResponse>(url: string): Promise<TResponse>; patch<TRequest, TResponse>(url: string, body: TRequest): Promise<TResponse>; post<TRequest, TResponse>(url: string, body: TRequest): Promise<TResponse>; put<TRequest, TResponse>(url: string, body: TRequest): Promise<TResponse>; protected abstract request<TRequest>(body?: TRequest): Promise<RequestInit>; protected send<T>(url: string, init?: RequestInit, method?: string): Promise<T>; } //# sourceMappingURL=Http.d.ts.map