При вызове метода GET пользовательское значение не добавляется в HEAD
import 'dart:html';
import 'package:http/http.dart' as http;
void main() async {
var url = 'https://dev";
var res = await http.get(
url,
headers: {'X-Api-Key': 'xxxxxx'},
);
print(res.body);
}
Я ожидаю вывод
Host: a.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0)
Gecko/20100101 Firefox/69.0
Accept: */*
Accept-Language: ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Access-Control-Request-Method: GET
Access-Control-Request-Headers: x-api-key
Referer: http://localhost:8080/
Origin: http://localhost:8080
DNT: 1
Connection: keep-alive
X-Api-Key: xxxxxx
Pragma: no-cache
Cache-Control: no-cache
TE: Trailers
(заголовок запроса firefox)
но фактический результат равен
Host: a.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0)
Gecko/20100101 Firefox/69.0
Accept: */*
Accept-Language: ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Access-Control-Request-Method: GET
Access-Control-Request-Headers: x-api-key
Referer: http://localhost:8080/
Origin: http://localhost:8080
DNT: 1
Connection: keep-alive
(заголовок запроса Firefox)