request-proxy

A version of request that's local to a fixed base uri

request-proxy

A version of request that's local to a fixed base uri

var RequestProxy = require("request-proxy")
 
var request = RequestProxy({
  host: "localhost",
  port: 8080
})
 
// requesting to http://localhost:8080/foo 
request("/foo", function (errresbody) {
  /* do stuff */
})

npm install request-proxy

  • Raynos