New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

isomorphic-fetch-http

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isomorphic-fetch-http - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

12

lib/isomorphic-fetch-http.js

@@ -104,13 +104,13 @@ 'use strict';

key: 'get',
value: function get(url, param) {
var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
value: function get(url, param, cors) {
var header = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
return this[http](url + '?' + (0, _qs.stringify)(param), {}, header);
return this[http](url + '?' + (0, _qs.stringify)(param), cors ? { mode: "no-cors" } : {}, header);
}
}, {
key: 'post',
value: function post(url, param) {
var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
value: function post(url, param, cors) {
var header = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
return this[http](url, { method: 'POST', body: (0, _qs.stringify)(param) }, header);
return this[http](url, _extends({ method: 'POST', body: (0, _qs.stringify)(param) }, cors ? { mode: "no-cors" } : {}), header);
}

@@ -117,0 +117,0 @@ }, {

{
"name": "isomorphic-fetch-http",
"version": "2.0.0",
"version": "2.0.1",
"description": "react fetch by isomorphic-fetch",

@@ -5,0 +5,0 @@ "main": "lib/isomorphic-fetch-http.js",

@@ -64,8 +64,8 @@ import fetch from 'isomorphic-fetch';

get(url, param, header = {}) {
return this[http](`${url}?${stringify(param)}`, {}, header);
get(url, param, cors, header = {}) {
return this[http](`${url}?${stringify(param)}`, cors ? { mode: "no-cors" } : {}, header);
}
post(url, param, header = {}) {
return this[http](url, {method: 'POST', body: stringify(param)}, header);
post(url, param, cors, header = {}) {
return this[http](url, {...{method: 'POST', body: stringify(param)}, ...cors ? { mode: "no-cors" } : {}}, header);
}

@@ -72,0 +72,0 @@

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