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

xhr

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xhr - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

16

index.js

@@ -45,3 +45,3 @@ "use strict";

}
var failureResponse = {

@@ -55,3 +55,3 @@ body: undefined,

}
function errorFunc(evt) {

@@ -79,3 +79,3 @@ clearTimeout(timeoutTimer)

var err = null
if (status !== 0){

@@ -97,5 +97,5 @@ response = {

callback(err, response, response.body)
}
if (typeof options === "string") {

@@ -135,3 +135,3 @@ options = { uri: options }

if (method !== "GET" && method !== "HEAD") {
headers["Content-Type"] = "application/json"
headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json") //Don't override existing accept header declared by user
body = JSON.stringify(options.json)

@@ -178,4 +178,4 @@ }

}
if ("beforeSend" in options &&
if ("beforeSend" in options &&
typeof options.beforeSend === "function"

@@ -182,0 +182,0 @@ ) {

{
"name": "xhr",
"version": "2.0.3",
"version": "2.0.4",
"description": "small xhr abstraction",

@@ -5,0 +5,0 @@ "keywords": [

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