0

I'm using the npm-request package to capture HTTP response. In case of status code 304, it captures an empty body.

r(reqOptions, (err, response, body) => {
    logger.info("Response: " + response.statusCode);
    logger.debug(body)
}).pipe(res)

How can I capture data in case of 304 status code?

Amit Kumar Gupta
  • 7,193
  • 12
  • 64
  • 90

1 Answers1

0

request library is no more actively supported. Hence, I have moved to axios which solved my problem. In axios, I'm able to push the response data stream to file system and to HTTP response further.

Amit Kumar Gupta
  • 7,193
  • 12
  • 64
  • 90