Hi. Trying to write a test that compares an actual...
# http4k
a
Hi. Trying to write a test that compares an actual response to a saved response. The response body is pretty-printed JSON. When i parse my saved response (
Response.parse(...)
), the body is joined to a single line. Looking at http4k source, i see this: https://github.com/http4k/http4k/blob/master/http4k-core/src/main/kotlin/org/http4k/core/parser.kt#L31
Copy code
private fun parseBody(bodyLines: List<String>): Body = Body(bodyLines.joinToString(""))
Is this a bug? Should it instead say
Copy code
private fun parseBody(bodyLines: List<String>): Body = Body(bodyLines.joinToString("\r\n"))
(or just
\n
perhaps)?