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

@highpoint/js-fetch

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@highpoint/js-fetch - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

README.md

3

CHANGELOG.md
# v0.1.0
* Initial release
# v0.1.1
* Automatically add `postDataBin=y` to JSON requests (if it's not already there)

12

dist/js-fetch.js

@@ -99,4 +99,3 @@ 'use strict';

headers: _extends({
'X-CSRF-Token': getCookieValue('CSRFToken')
}, headers)
'X-CSRF-Token': getCookieValue('CSRFToken') }, headers)
}, otherArgs));

@@ -119,2 +118,9 @@ };

// Set postDataBin if it has not already been set
var getBinaryURL = function getBinaryURL(url) {
if (/[?&]postDataBin=/.test(url)) return url;
var separator = url.indexOf('?') === -1 ? '?' : '&';
return url + separator + 'postDataBin=y';
};
var doJSONPost = function doJSONPost(url) {

@@ -127,3 +133,3 @@ var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

return doPost(url, _extends({
return doPost(getBinaryURL(url), _extends({
headers: _extends({

@@ -130,0 +136,0 @@ 'Content-Type': 'application/json'

{
"name": "@highpoint/js-fetch",
"version": "0.1.0",
"version": "0.1.1",
"description": "HighPoint Fetch Library",

@@ -5,0 +5,0 @@ "main": "dist/js-fetch.js",

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