Closed
Description
Dio version: dio: ^3.0.8
When I set Dio header like this
dio.options.headers['Authorization'] = 'dGVzdDp0ZXN0';
I expect request header to look like this
Authorization: Basic dGVzdDp0ZXN0
Not like this (notice that capital "A" was transformed to "a")
authorization: Basic dGVzdDp0ZXN0
Reason for this is HERE. All headers are transformed to lower case.
I can only guess what your motivation for this was, but this is wrong.
Please read about it HERE and HERE
Even Dart team is currently reverting this
https://dart-review.googlesource.com/c/sdk/+/119100
Dio 2.1.5 did not have this behavior. I was able to use AltHttpClient with Dio and headers where left AS IS.
Metadata
Metadata
Assignees
Labels
No labels