HTTP GET Request in Node.js Express
问题 How can I make an HTTP request from within Node.js or Express.js? I need to connect to another service. I am hoping the call is asynchronous and that the callback contains the remote server's response. 回答1: Here is a snippet of some code from a sample of mine. It's asynchronous and returns a JSON object. It can do any form of GET request. Note that there are more optimal ways (just a sample) - for example, instead of concatenating the chunks you put into an array and join it etc... Hopefully,