httpplease-prefix
A httpplease plugin to prefix all URLs.
Installation
npm install --save httpplease-prefix
Usage
The function accepts a string
parameter. If not supplied, it defaults to /api
.
ES6
;; const http = httplease;const http2 = httpplease; http; // Will call /api/mehttp2; // Will call /api/v1/me
ES5
var httpplease = ;var prefix = ;var http = httpplease;var http2 = httpplease; http; // Will call /api/mehttp2; // Will call /api/v1/me
License
Copyright © 2015 Neil Kistner
Released under the MIT license. See license for details.