Documentation for HTTPS Request with cookie?
Would it be possible to get some documentation on how to connect ehttp to perform https requests submitted with cookies, and how those cookies can be set via the response? Thanks!
I think adding docs for that would be great. Would you like to help out?
ehttp is a very thin wrapper around ureq and web_sys::Request, so it should be pretty easy to figure out!
Would it be possible to have cookies as a first-class feature in ehttp?
For reference: cookies can be accessed within response.headers.
I'm not sure what you mean by "first class" ? I'm guessing either:
- Some way to more easily retrieving cookie values from a single request (from response.headers), I'm not sure how much simpler it would be compared to bringing another dependency to parse the cookie (I guess https://docs.rs/cookie/latest/cookie/ ?)
- Automatic retrieving of cookies, storing and sending them again, I'm not the maintainer, but I think it's quite complex to add, and likely to fit better in another library wrapping around ehttp:
- Where do you store the cookie ? in memory ? in a file ?
- secure cookie (http only) are a thing, how should they be handled.
- expiry handling
- Probably other things I did not think about.
I see set-cookie in the response headers when visiting common websites.
Yes I am asking about proper overall handling of the cookie including storage for both native and wasm egui applications, including storage. If I would need to make my own decisions about cookie storage, some guidance would be useful...