Hello everyone!
I'm using forms in a akka-http app and I have an issue with `formFieldMap`
directive: it start to fail after a akka update (akka-http 10.0.6 -> 10.0.8
and akka 2.5.1 -> 2.5.3).
I feel like the FormData was not required before this change (as some of my
test use also akka-http, was fine to just add an empty FormData and it
solved the issue).
My main question is: if I don't provide a form data in my request, would a
directive formFieldMap be taken or not? What about the parameterMap which
seams taken even if empty?
I'm stuck currently trying to make test using basic HttpURLConnection work
with the update (was working before). Have someone already tested
formFieldMap/Seq without akka-http test support? Here is part of code I'm
using to test:
val conn: HttpURLConnection = createHttpConnection(urlEndpoint)
conn.setRequestMethod("GET")
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded")
val postDataBytes: Array[Byte] = "foo=bar".getBytes(*"UTF-8"*)
conn.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length))
conn.getOutputStream.write(postDataBytes)
val response: Int = conn.getResponseCode
val inputStream: InputStream = conn.getInputStream
(readUtf8InputStream(inputStream), conn.getHeaderFields)
Many thanks for any hint and have a nice day!
Christophe
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.