UNPKG

@logi.one/rest-client

Version:

This is a free, ultra-lightweight and easy to use rest client for node.js supporting JSON requests and streams with no external dependencies.

7 lines (6 loc) 599 B
import { RequestOptions } from './request-options'; export declare function get(url: string, options?: RequestOptions<undefined>): Promise<Response>; export declare function del(url: string, options?: RequestOptions<undefined>): Promise<Response>; export declare function post(url: string, options?: RequestOptions<BodyInit>): Promise<Response>; export declare function put(url: string, options?: RequestOptions<BodyInit>): Promise<Response>; export declare function request(method: 'GET' | 'POST' | 'PUT' | 'DELETE', url: string, options?: RequestOptions<BodyInit | undefined>): Promise<Response>;