No, it is not impossible to access cookies through HTTP response while using Flutter. You can use the http
package to make HTTP requests and retrieve cookies in the response header using the headers
property. Here's an example:
import 'package:http/http.dart' as http;
final response = await http.get(url);
final cookie = response.headers['set-cookie'];
This will retrieve the set-cookie
header from the HTTP response and store it in the cookie
variable. You can then use this cookie in subsequent HTTP requests.
Asked: 2022-04-11 11:00:00 +0000
Seen: 8 times
Last updated: Dec 08 '21