expand readme
This commit is contained in:
parent
a73e0d1d80
commit
4bd4740a86
@ -37,7 +37,7 @@ const requestor = require('requestor');
|
||||
const express = require('express');
|
||||
|
||||
const app = express();
|
||||
requestor(app, 'api', {foo: 'bar'});
|
||||
requestor(app, 'api', {opts: {foo: 'bar'}});
|
||||
app.listen(3000);
|
||||
```
|
||||
|
||||
@ -64,7 +64,7 @@ optionally, you can set a subdirectory for all requests
|
||||
```js
|
||||
//...
|
||||
|
||||
requestor(app, 'api', {foo: 'bar'}, 'subdir');
|
||||
requestor(app, 'api', {subdir: 'subdir'});
|
||||
|
||||
// requests that before responded to /foo/bar/ will now respond to /subdir/foo/bar/
|
||||
```
|
||||
|
Reference in New Issue
Block a user