Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A robust lightweight wrapper for asynchronous http requests
JavaScript
Branch: master
Pull request Compare This branch is 256 commits behind ded:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
build
make
src
tests
.gitignore
Makefile.js
README.md
package.json
reqwest.js
reqwest.min.js

README.md

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!

Something went wrong with that request. Please try again.