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

svix-fetch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svix-fetch

An isomorphic WHATWG Fetch API, for Node & Browserify with keepalives

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
182K
increased by15.64%
Maintainers
1
Weekly downloads
 
Created
Source

Svix - Webhooks as a service

svix-fetch is a fork of Matthew Andrew's wonderful WHATWG Fetch polyfill for node and bowserfy: isomorphic-fetch.

The main purpose of this fork is to enable keepalives when running in a node context.

Unless you have a specific need for this functionality we recommend using isomorphic-fetch.

Installation

NPM

npm install --save svix-fetch

Bower

bower install --save svix-fetch

Usage

require('svix-fetch');

fetch('//offline-news-api.herokuapp.com/stories')
	.then(function(response) {
		if (response.status >= 400) {
			throw new Error("Bad response from server");
		}
		return response.json();
	})
	.then(function(stories) {
		console.log(stories);
	});

License

This code is licenced under the MIT licence. Based on isomorphic-fetch by matthew-andrews.

Alternatives

FAQs

Package last updated on 19 Jan 2022

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