Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsofapollo committed May 1, 2014
1 parent d35d156 commit ebc6cd4
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Expand Up @@ -2,18 +2,25 @@ superagent-promise
================== ==================


Simple/dumb promise wrapper for superagent. Both `superagent` and Simple/dumb promise wrapper for superagent. Both `superagent` and
`promise` are peerDependencies. The `.get`, `.del`, etc.. helper methods `promise` are peerDependencies.
are not present here.




## Usage ## Usage


```js ```js
var agent = require('superagent-promise'); var agent = require('superagent-promise');


agent('GET', 'http://google.com').end().then( // method, url form
function onResult() { agent('GET', 'http://google.com').

end().
} then(function onResult() {
); });

// helper functions: get, head, patch, post, put, del
agent().
put('http://myxfoo', 'data').
end().
then(function() {
});

``` ```

0 comments on commit ebc6cd4

Please sign in to comment.