This package has been deprecated

Author message:

Use node-fetch instead.

nekocurl

1.5.1 • Public • Published

Nekocurl

Build Status NPM version dependencies Status Scrutinizer Code Quality Code Coverage

A HTTP client class that uses plug-in drivers to do HTTP requests. Default driver is the native http/https module ("nekocurl"), unless you overwrite it.

You need to install the packages for the drivers yourself (peer dependencies). Nekocurl comes with drivers for snekfetch and request.

Installation

npm install nekocurl

Example

const Nekocurl = require('nekocurl');
(new Nekocurl(
    'https://curl.neko.run/test.json',
    {
        driver: 'nekocurl',
        method: 'GET',
        json: true
    }
)).send().then((json) => {
    console.log(json);
});

// or
Nekocurl.get('https://curl.neko.run/test.json', { json: true }).then((json) => {
    console.log(json);
});

Static methods (lowercase naming) are available for the following methods: GET, HEAD, POST, PUT, PATCH and DELETE.

Documentation

https://charlottedunois.github.io/node-nekocurl/

Readme

Keywords

none

Package Sidebar

Install

npm i nekocurl

Weekly Downloads

1

Version

1.5.1

License

MIT

Last publish

Collaborators

  • charlottedunois