Hello, I think we may have found a bug. We have a ...
# http4k
q
Hello, I think we may have found a bug. We have a form which we TDD’d all lovely with the WebDriver functionality, yay. When we run it through a browser though we have some problems. When we do
req.form("foo")
it comes through as NULL. However the data is in the request body. Upon some investigation it looks like the form code relies on the body string (obvs)
fun Request.form(): Form = body.toString().toParameters()
. When you print
body
when sent from the browser it reports
<<stream>>
as presumably the request from the browser comes through using the
StreamBody
implementation. When you print it through the test it comes out as you would expect. Or maybe it’s not a bug and we’re being dumb 🙂 Any ideas?