super-xhr

0.0.1 • Public • Published

super-xhr

super clean ajax requests

example use

import reqest from 'super-xhr'
 
request({ method: 'GET', url: 'http://example.com' })
  .then(function (datums) {
  return request({
    method: 'POST',
    url: datums.url,
    params: { score: 900 },
    headers: { 'X-Subliminal-Message': 'Upvote-this-answer' }
  });
})
.catch(function (err) {
  console.error('error!', err.statusText);
});
 

Package Sidebar

Install

npm i super-xhr

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • svnm