-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fetching a document which 401s #229
Comments
|
thanks @dgraham . I made the following mistake:
It may be worth closing such issues but tagging them "howto" so that people writing more general public documentation can look through these questions and write HOWTOs with the answers given. |
Duh. I also thought this was the whatwg fetch github. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a document served from localhost that calls a document
https://joe.example:8443/2013/card
on a different server that returns a 401 .Currently in
Chrome 48.0.2554.0 canary (64-bit)
this shows up asThe FetchEvent for "https://joe.example:8443/2013/card" resulted in a network error response: the promise was rejected.
If the same file were served by localhost on a different port it would be accessible.
So this seems to be a CORS problem. I am not sure if the spec allows me to capture 401s or not. I have I think set
{ mode: "cors", credentials: "omit" }
( I say I think because I am working from scala-js and am not yet that familiar with it. The console shows the following:It is not so clear from the fetch documentation what the different modes actually mean. Should I be able to find the 401? I'd like to be able to work out what authentication I can use on the future requests.
It could also be that I my RequestInit datastructure is incorrect. But as I don't yet know what to expect it is difficult to work out what may be wrong.
The text was updated successfully, but these errors were encountered: