nekocurl v1.5.1
Nekocurl
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
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago