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