Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am working on a node.js script to read from an API. I have a mockup file that will be the end result of the API on my filesystem.

without spinning up a web server to serve the mockup on my local machine, is there a way I can request the file with node's http.js component?

I want to be able to write

request('file:///home/me/work/apimockup.xml', {
    complete: function(err, body){

/etc
share|improve this question
3  
can't you just use the core module fs? – gustavohenke yesterday
Did you try and see something? – Mustafa yesterday

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.