Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README.md

  • Loading branch information...
commit ebc6cd457aa4f515d89c0532658bd6dc089f9af3 1 parent d35d156
@lightsofapollo authored
Showing with 14 additions and 7 deletions.
  1. +14 −7 README.md
View
21 README.md
@@ -2,8 +2,7 @@ superagent-promise
==================
Simple/dumb promise wrapper for superagent. Both `superagent` and
-`promise` are peerDependencies. The `.get`, `.del`, etc.. helper methods
-are not present here.
+`promise` are peerDependencies.
## Usage
@@ -11,9 +10,17 @@ are not present here.
```js
var agent = require('superagent-promise');
-agent('GET', 'http://google.com').end().then(
- function onResult() {
-
- }
-);
+// method, url form
+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() {
+ });
+
```
Please sign in to comment.
Something went wrong with that request. Please try again.