Skip to content

unshiftio/xhr-send

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xhr-send

Made by unshiftVersion npmBuild StatusDependenciesCoverage StatusIRC channel

A cross-browser implementation for sending data over the supplied XHR connection.

Installation

npm install --save xhr-send

Usage

The module requires 3 arguments:

  • xhr The reference to your constructed XMLHttpRequest instance.
  • data The data that needs to be sent.
  • fn Completion callback that receives the error as first argument.
var send = require('xhr-send');

send(xhr, 'data', function (err) {
  if (err) return console.error('failed to send because of reasons', err);

  console.log('sent without any issues.');
});

License

MIT

About

Safely send data over the given XHR request.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published