-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
WASM cookies #2360
base: master
Are you sure you want to change the base?
WASM cookies #2360
Conversation
I rebased the PR and made a few lint related commits. I reviewed the code again in light of #1449 and they are very similar. I put a lot more of the code in
|
PS. Maybe somewhere we should add a warning that WASM cookies won't work for WebSockets because according to https://devcenter.heroku.com/articles/websocket-security#authentication-authorization
The emphasis above is mine. The way cookies are implemented right now for WASM is very similar to how it is done for native which means in the browser it has to use JavaScript to set the cookies in the header which is not allowed for WebSocket requests. |
Namely - impl fmt::Debug for ClientBuilder - impl fmt::Debug for Client
Didn't fit well with merging of headers as the headers needed to be re-borrowed anyway to get url
Resolved dead_code warning and was useful even if not to me
clippy::redundant_pattern_matching
I think the current version PR as is still be helpful for more than just me.and the Websocket issue is kinda out of reach without trying to use the browsers cookie store. If we could merge this I'd appreciate it as I need it and don't really want to have to keep maintaining a fork. |
I got cookies working for WASM to the best of my knowledge. I tested it in my use case and it works. I'm not sure how to add tests for the cookie functionality I added for WASM.
I also have one part of the code that I'm unsure of because I didn't see a clear translation between the native version and the WASM version.
Please let me know what you need me to do or change anything (including if the code I mentioned that I was unsure of is ok).
Edit:
If you need this functionality before the PR lands you can add the following to the bottom of your
Cargo.toml
. If you need me to rebase to keep up with changes toreqwest
let me know (replying here would work as well) as I may not update unless a reason comes up such as I'm doing an updates on my dependencies or a security fixed comes out.