cookies
cookies copied to clipboard
useWebKit option on setFromResponse/getFromResponse
Feature request
I'm using this library with the hopes of sharing cookies with a WKWebView, and while setFromResponse
provides a clean way for me to set cookies from an API response, it doesn't provide the same useWebKit
argument that the other getters and setters have, nor does getFromResponse
Thanks for the issue @davidsharp. This is true, this should not be too difficult to do. Just need to parse the cookie strong and make a valid cookie object to set in WKWebView
I have a patch for at least the setFromResponse aspect if that's helpful? I'm not in a position right now to do a proper PR but I can provide a gist or something with a patch file?
Edit: I've written code for getFromResponse too, though I don't personally use that feature so am unsure of an appropriate test to ensure it works.
@Loxrie a partial PR is welcome! I could help get it merged in.
I have a gist of my patch file here:
https://gist.github.com/Loxrie/7f7761d23dd0cd85579032334f84d294
Though I haven't tested getFromResponse.
Nice! Could you create a Draft PR with your changes so I could check it out? @Loxrie
I can try yes, it's difficult for me because of work.
Apologies for the hastily filled out PR, I tried to conform to the template.
Is there any update on when this will be released?
Any update on this getting added?