http
http copied to clipboard
Doesn't work "http head request" with cookie?
Can't make request with cookie.
This is how it's done in curl:
curl -sS -I "url" -H "Cookie: sjv=123"
This is how it's done in python
import requests
response = requests.head('url', cookies={'sjv': '123'})
Dart http not working:
import 'package:http/http.dart' as http;
void main() async {
var res = await http.head('url', headers: {'Cookie': 'sjv=123'});
print(res.body);
}