DEV Community

Discussion on: Today I Learned: To use custom ClientHttpRequestFactory with MockRestServiceServer

Collapse
 
ericathedev profile image
Erica Tanti

I use BufferingClientHttpRequestFactory so that the response from the server can be read twice - once for logging and next by the application code, the test code would fail on the second read.

This was happening to me when I removed BufferingClientHttpRequestFactory and I couldn't figure out what was happening. Thank you for explaining why!

Collapse
 
shriharshmishra profile image
Shriharsh

Welcome 😊