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

minixhr

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minixhr - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

2

package.json
{
"name": "minixhr",
"version": "3.0.3",
"version": "3.0.4",
"description": "super simpel and small cross-browser xhr",

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

# minixhr
super simpel and small cross-browser xhr
super simple and small cross-browser XMLHttpRequest (XHR)

@@ -8,3 +8,3 @@ # USAGE

function responseHandler (data, response, xhr, header) {
var callback = function responseHandler (data, response, xhr, header) {
console.log(data)

@@ -14,5 +14,5 @@ }

var request = { // can be 'url string' or object:
url : 'http://jsonplaceholder.typicode.com/posts/1',
url : 'http://requestb.in/18b4srl1',
method : 'POST', // [optional] (defaults to 'GET')
body : 'payload', // [optional] payload data could be <formdata> or {key:val}'s or anything
body : '{ "foo": 123, "bar": "abc" }', // [optional] payload data could be <formdata> or {key:val}'s or anything
headers : {} // [optional] (defaults to '{}' or in case of 'POST':

@@ -23,11 +23,7 @@ // {'X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded' } )

// EXAMPLE 1
var callback = responseHandler
minixhr(request, callback) // [optional] callback - (e.g. leave out for POST Request where you don't care about a response
// EXAMPLE 2
minixhr('http://requestb.in/18b4srl1', function (data) { console.log(data) })
minixhr('http://jsonplaceholder.typicode.com/posts/1', callback)
// check http://requestb.in/18b4srl1?inspect afterwards to inspect
// EXAMPLE 3 - github
minixhr()
```
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