cookies icon indicating copy to clipboard operation
cookies copied to clipboard

useWebKit option on setFromResponse/getFromResponse

Open davidsharp opened this issue 3 years ago • 9 comments

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

davidsharp avatar Aug 13 '20 09:08 davidsharp

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

safaiyeh avatar Aug 14 '20 03:08 safaiyeh

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 avatar Aug 14 '20 11:08 Loxrie

@Loxrie a partial PR is welcome! I could help get it merged in.

safaiyeh avatar Aug 14 '20 16:08 safaiyeh

I have a gist of my patch file here:

https://gist.github.com/Loxrie/7f7761d23dd0cd85579032334f84d294

Though I haven't tested getFromResponse.

Loxrie avatar Aug 17 '20 17:08 Loxrie

Nice! Could you create a Draft PR with your changes so I could check it out? @Loxrie

safaiyeh avatar Aug 17 '20 18:08 safaiyeh

I can try yes, it's difficult for me because of work.

Loxrie avatar Aug 17 '20 19:08 Loxrie

Apologies for the hastily filled out PR, I tried to conform to the template.

Loxrie avatar Aug 17 '20 19:08 Loxrie

Is there any update on when this will be released?

philpettican avatar Feb 17 '21 07:02 philpettican

Any update on this getting added?

willxy avatar Mar 11 '24 23:03 willxy