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

zan-ajax

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zan-ajax - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1-beta1

9

lib/ajax.js

@@ -27,2 +27,4 @@ 'use strict';

var FORM_URLENCODED = 'application/x-www-form-urlencoded';
function isJSONPRequest(options) {

@@ -82,6 +84,7 @@ return options.dataType === 'jsonp';

var contentType = utils.getHeaderContentType(options.contentType, options.headers);
utils.addEntry(axiosOptions, 'headers.content-type', contentType);
if (method === 'get' || method === 'head') {
utils.addEntry(axiosOptions, 'paramsSerializer', utils.stringifyQueryString);
utils.addEntry(axiosOptions, 'params', options.data);
utils.addEntry(axiosOptions, 'headers.content-type', contentType);
}

@@ -91,6 +94,6 @@

utils.addEntry(axiosOptions, 'data', options.data);
utils.addEntry(axiosOptions, 'headers.content-type', contentType || 'application/x-www-form-urlencoded; charset=UTF-8');
// Pass to server as is for other content types
if (axiosOptions.headers['content-type'].toLowerCase().indexOf('application/x-www-form-urlencoded') !== -1) {
var _contentType = axiosOptions.headers['content-type'] || FORM_URLENCODED;
if (_contentType.toLowerCase().indexOf(FORM_URLENCODED) !== -1) {
utils.addEntry(axiosOptions, 'transformRequest', utils.stringifyQueryString);

@@ -97,0 +100,0 @@ }

{
"name": "zan-ajax",
"version": "1.2.0",
"version": "1.2.1-beta1",
"description": "Promise based HTTP client for the browser and node",

@@ -11,3 +11,3 @@ "main": "lib/index.js",

"test": "npm run browserify:test && open test/index.html",
"prepublish": "npm run lint && npm run build"
"prepare": "npm run lint && npm run build"
},

@@ -14,0 +14,0 @@ "types": "./typings/index.d.ts",

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