akka http spams the log with warnings like the following:
a.a.ActorSystemImpl WARN Explicitly set HTTP header 'Content-Length: 183' is ignored, explicit `Content-Length` header is not allowed. Use the appropriate HttpEntity subtype.
(akka http version 10.1.11, sttp version 2.0.1)
As a workaround I did this:
val r = basicRequest
.post(uri"https://some-uri.nowhere")
.body(Map("a" -> "A"))
r.copy(headers = r.headers.filterNot(_.name == HeaderNames.ContentLength))
.send()
With akka-http backend and a request like this:
akka http spams the log with warnings like the following:
(akka http version
10.1.11
, sttp version2.0.1
)As a workaround I did this:
but it's not too pretty :)