Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.
/ reqwest Public archive
forked from ded/reqwest

A robust lightweight wrapper for asynchronous http requests

Notifications You must be signed in to change notification settings

nephics/reqwest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It's AJAX

All over again.

The happs

$ git clone git://github.com/ded/reqwest.git
$ cd reqwest
$ npm install --dev
$ npm run-script boosh

API

reqwest('path/to/html', function (resp) {
  qwery('#content').html(resp);
});
reqwest({
  url: 'path/to/json',
  type: 'json',
  method: 'post',
  success: function (resp) {
    qwery('#content').html(resp.content);
  },
  failure: function (err) { }
});
reqwest({
  url: 'path/to/data.jsonp?callback=?',
  type: 'jsonp',
  success: function (resp) {
    qwery('#content').html(resp.content);
  }
});
reqwest({
  url: 'path/to/data.jsonp?foo=bar',
  type: 'jsonp',
  jsonpCallback: 'foo',
  success: function (resp) {
    qwery('#content').html(resp.content);
  }
});

The Tests

npm test
open http://localhost:1234

Browser support

  • IE6+
  • Chrome 1+
  • Safari 3+
  • Firefox 1+
  • Opera

Ender Support

Reqwest can be used as an Ender module. Add it to your existing build as such:

$ ender add reqwest

Use it as such:

$.ajax({ ... });
$(form).serialize();

Happy Ajaxing!

About

A robust lightweight wrapper for asynchronous http requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%