update docs for promises
This commit is contained in:
parent
ef3183e984
commit
4f3fe38ee4
|
@ -28,9 +28,7 @@ request('http://www.google.com', function(error, response, body) {
|
|||
**Using Promises**
|
||||
|
||||
```js
|
||||
var promisify = require('util').promisify;
|
||||
var request = require('@root/request');
|
||||
request = promisify(request);
|
||||
|
||||
request('http://www.google.com')
|
||||
.then(function(response) {
|
||||
|
|
Loading…
Reference in New Issue