http-client-best
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Installation

npm install http-client

APIs

Create New Cliet

import HttpClient from 'http-client';
// or use: const HttpClient = require('http-client').default;

const httpClient = new HttpClient();
const headers = {
            'Content-Type': 'application/json',
            'Accept': '*/*'
        };
const body = {};
const config = {
    headers,
    body
};

Get

const response = await httpClient.get(url, config);

Post

const response = await httpClient.post(url, config);

Put

const response = await httpClient.put(url, config);

Patch

const response = await httpClient.patch(url, config);

Delete

const response = await httpClient.delete(url, config);

Head

const response = await httpClient.head(url, config);

/http-client-best/

    Package Sidebar

    Install

    npm i http-client-best

    Weekly Downloads

    314

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    9.29 kB

    Total Files

    7

    Last publish

    Collaborators

    • chris.li1213