Skip to content

Commit

Permalink
more readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
radiosilence committed Mar 2, 2015
1 parent 823bbb7 commit 56119d6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
==
xr
==

Really simple wrapper about XHR that provides a couple of nice functions,
exposes the XHR object wherever relevant, and returns an ES6 Promise (or
whatever Promise is set to globally, if you want to use something else).

Quickstart
----------

xr.get('/api/items', {take: 5})
.then(res => console.log(res.data));
xr.post('/api/item', {name: 'hello'})
.then(res => console.log("new item", res.data));

Extended syntax:
Extended syntax:

xr({
method: xr.Methods.GET,
Expand Down Expand Up @@ -48,4 +52,8 @@

There must be a polyfill that supports at least the standard ES6 promise API
(xr will use whatever's there), and Object.assign().

License
-------

See LICENSE

0 comments on commit 56119d6

Please sign in to comment.