使用Flutter dio进行网络请求,headers中的参数都被被转成小写,传给后台
例如:
dio.options.headers["Authorization"] = "Basic <对应 token>";
接口请求中Authorization会自动变成authorization

如何不让请求中的headers中的值变成小写呢?
使用Flutter dio进行网络请求,headers中的参数都被被转成小写,传给后台
例如:
dio.options.headers["Authorization"] = "Basic <对应 token>";
接口请求中Authorization会自动变成authorization

如何不让请求中的headers中的值变成小写呢?
/// HTTP request headers.
///
/// The keys of the header are case-insensitive,
/// e.g.: content-type and Content-Type will be treated as the same key.
Map<String, dynamic>? headers;
header的key是不区分大小写的