Created
September 22, 2015 21:46
-
-
Save phated/03cc54cc4022df2693ea to your computer and use it in GitHub Desktop.
pathprefix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rest = require('rest'); | |
| var pathPrefix = require('rest/interceptor/pathPrefix'); | |
| var client = rest.wrap(pathPrefix, { prefix: 'http://example.com/' }); | |
| // will request from `http://example.com//something` | |
| client({ path: '/something' }).then(console.log.bind(console)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment