jossef / jossef/requests

I get the "Refused to set unsafe header "cookie"" error when I try from flutter web

Open
#88 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Dart
Stars
143
Forks
52
PR merge metrics
No merged PRs in 30d

Description

Hi!

When I am using Flutter built on chrome and try to send a post request to my Express server to sign in, the cookie is not stored and the console reads the error : Refused to set unsafe header "cookie".

Here is the code that calls from the server side:

final response = await Requests.post("http://localhost:3000/signin",
json: {"username": username, "password": password},
withCredentials: true);

response.raiseForStatus();

- OS: Windows 10 Home
- Chrome Version 106.0.5249.119

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.