I am using the flutter http package. Is there a way to send cookies without using header? To be clear below is an example of doing so using curl:
curl --cookie "auth_session=abcd" http://127.0.0.1:9011/api/v1/login
Also, I'm using flutter for both web and mobile. Therefore, the io-library-based solutions are not applicable to web. Like this one which is not even using the http package.
Currently, I'm using http package like so:
final String uri = "www.example.com";
final response = await post(
Uri.parse(uri),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
'Cookie': 'sessionid=asdasdasqqwd' // Don't want to use header
},
body: body),
);
Thanks in advance.