title: How do I write an image to buffer using native Node JS HTTP library?
body: <p>I am really new to JavaScript and Node JS. I have various image URLs that I want to buffer. I have tried the request npm module but want a lower level library for what I want to achieve.</p>
  
  <p>For example:
  <a href="http://assets.loeildelaphotographie.com/uploads/article_photo/image/128456/_Santu_Mofokeng_-_TOWNSHIPS_Shebeen_Soweto_1987.jpg" rel="nofollow noreferrer">http://assets.loeildelaphotographie.com/uploads/article_photo/image/128456/_Santu_Mofokeng_-_TOWNSHIPS_Shebeen_Soweto_1987.jpg</a></p>
  
  <p>I see lots of <a href="https://stackoverflow.com/a/9578403/5884189">examples</a> that suggest using the <a href="https://www.npmjs.com/package/request" rel="nofollow noreferrer">request module</a> or examples that save files to disk. However, I cannot find an HTTP GET request example that simply buffers the image so I can pass to another function. It needs to have an "end" event so I upload the buffered image data with confidence in another step. Is there a sample pattern or "how to" on this someone could provide? Thanks!</p>