http
http copied to clipboard
Can't retrieve response headers on flutter web
Hi!
I can't get any response header from xhr response. Only "content-type" -> "application/json" and "content-length" -> "206" are retrieved
I did some debug and this only happen when executing send method from BrowserClient. Instead, with the same api, in flutter using IoClient all works as expected.
Of course domain of cookies it's the same from web app domain.
In order to reproduce the bug you can do any simple http request that put headers in response.
I am also facing the same issue so, any update on this issue ?
Setting the header param "Access-Control-Expose-Headers" = "*"
from the server side did the trick.
Setting the header param
"Access-Control-Expose-Headers" = "*"
from the server side did the trick.
Bless you
+1 on the bless you!
Created MR to document this: https://github.com/dart-lang/http/pull/1062
New smaller MR: https://github.com/dart-lang/http/pull/1083