Socket
Socket
Sign inDemoInstall

fetchface

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "fetchface",
"version": "1.0.1",
"version": "1.0.2",
"description": "A convenient interface for the Fetch API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -60,3 +60,12 @@ # Fetchface

// Add a callback hook to be fired upon specific response codes
// Set a request header for a single request
fetchf.post('/users', {
body: { name: 'Dave' },
headers: { 'x-my-custom-header': 'awesome' },
})
.then(newUserData => {
console.log(newUserData);
});
// Add a callback hook to be fired upon receiving specific response codes
fetchf.onResponseCode(401, () => {

@@ -77,2 +86,2 @@ console.log('Unauthorized!');

## License
[MIT License](https://github.com/justinsisley/fetchface/blob/master/LICENSE.md) © [Justin Sisley](http://justinsisley.com/)
[MIT License](https://github.com/justinsisley/fetchface/blob/master/LICENSE.md) © [Justin Sisley](http://justinsisley.com/)
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc