Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chainfetch

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chainfetch

A simple, chainable wrapper around node-fetch!

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
increased by126.67%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version NPM downloads Dependencies Install Size

NPM info

Chainfetch

Chain your request together with this package!

Wraps around node-fetch to provide you a easier API for it, to ease up migrating to it.

Getting Started

First off, you need to install the module! To do so,

npm i chainfetch

# Or if you are using yarn

yarn add chainfetch

And then you're ready to roll! Or...chain.

Usage

The following examples assume you are in the context of an async function. All return functions return a promise for you to use.

const fetch = require('chainfetch');

const res = await fetch.get('https://example.com').toBuffer();

For posting data, you can do something similar to this

const fetch = require('chainfetch');

const res = await fetch.post('https://example.com').query({ isSimple: true }).query('isAmazing', true).send({ string: 'chainfetch is simple and amazing!' }).toJSON();

Keywords

FAQs

Package last updated on 02 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc