Huge News!Announcing our $40M Series B led by Abstract Ventures.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

super simpel and small cross-browser xhr

  • 1.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29K
increased by67.5%
Maintainers
1
Weekly downloads
 
Created
Source

minixhr

super simpel and small cross-browser xhr

USAGE

var minixhr = require('minixhr');

var callback = function responseHandler (data, response, xhr, header) { console.log(data); };
var request  = { // can be 'url string' or object:
  url          : 'http://github.com/serapath/holonify', // or e.g. http://ip.jsontest.com/a=1&b=2&c=3
  method       : 'POST',  // [optional] (defaults to 'GET')
  body         : 'payload', // [optional] payload data could be <formdata> or {key:val}'s or anything
  header       : {} // [optional] (defaults to '{}' or in case of 'POST':
                   // {'X-Requested-With':'XMLHttpRequest','Content-Type':'application/x-www-form-urlencoded' } )
};

// EXAMPLE 1
minixhr(request); // [optional] callback - (e.g. leave out for POST Request where you don't care about a response

// EXAMPLE 2
minixhr('http://requestb.in/qpvy9dqp', function (data) { console.log(data); });

Keywords

FAQs

Package last updated on 24 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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