Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Needed with Fetch with header #192

Closed
TuntematonSotilas opened this issue Aug 3, 2019 · 2 comments

Comments

@TuntematonSotilas
Copy link

@TuntematonSotilas TuntematonSotilas commented Aug 3, 2019

Hello , I need help with the Request method :
I try to get some datas from my backend wich needs a special header named "token"

So I do this :

Request::new(api_url.clone())
        .header("token", &token) 
        .fetch_json(Msg::DataFetched)

But I dont see my header "token" in the Request Headers in chrome debugger , and nor in my backend in debug mode.

FYI : I use seed version 0.4

Tanks for your help

@David-OConnor

This comment has been minimized.

Copy link
Member

@David-OConnor David-OConnor commented Aug 5, 2019

Unsure if this is a bug or something else yet. Will get back to you. Does it seem to only happen with the "token" header, or others as well?

@TuntematonSotilas

This comment has been minimized.

Copy link
Author

@TuntematonSotilas TuntematonSotilas commented Aug 5, 2019

The problem was not in Seed : it was my backend (problem of CORS)
I confirm that it works well with a GET and with a custom header 😀
Tanks for all, and good job for your framework , I love it 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.