On 4/1/22 06:21, Dietmar Maurer wrote:
let response = if let Method::POST = request.method {
-req.send(&*request.body)
+let bytes = request.body.as_slice();
+req.send_bytes(bytes)
Does this have the side effect of changing the transfer encoding? If so, it is
worth
> let response = if let Method::POST = request.method {
> -req.send(&*request.body)
> +let bytes = request.body.as_slice();
> +req.send_bytes(bytes)
Does this have the side effect of changing the transfer encoding? If so, it is
worth to add an inline comment.
Azure doesn't accept `Transfer-Encoding: chunked` on their token endpoint,
but with the switch to ureq we always send requests with this set.
Fix by switching to `Content-Length` in the header instead. ureq only
sets `Transfer-Encoding: chunked` when the body length is not known
beforehand, which