I’m writing a node.js application in apigee. This node.js application requires sending http requests to internet i.e. out of local network. I’m using npm’s request module to make http requests.
To reach outside local network, I need to pass http proxy in request call like this:
request({
proxy: proxy_url
url: url_to_reach
.......
})
HTTP Proxy configuration is present in the http.properties file under apigee configuration:
apigee4/conf/apigee/message-processor/http.properties.
I want to read proxy url from this file and use it in node.js request call. Is it possible to get value of http proxy in node.js? May be it’s already available in one of the flow / system / global variables?
I also tried using ‘use.proxy’ in httptargetconnection of target flow, but node.js runs as a separate javascript and target properties are not applicable there.
Please suggest.
Thanks.