expand readme

This commit is contained in:
Timo Hocker 2019-12-11 17:42:32 +01:00
parent a73e0d1d80
commit 4bd4740a86

View File

@ -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/
```