Skip to content
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

Implement req_cookie_file() #282

Merged
merged 12 commits into from
Aug 31, 2023
Merged

Implement req_cookie_file() #282

merged 12 commits into from
Aug 31, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Aug 21, 2023

Fixes #223

@hadley hadley requested a review from mgirlich August 23, 2023 20:34
@hadley
Copy link
Member Author

hadley commented Aug 23, 2023

@mgirlich what do you think of the name?

Copy link
Contributor

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks super useful! Some thoughts on the name:

  • req_cookie_file() makes it feel like the thing I care about is the file, moreso than the reuse of the cookies.
  • Would it make sense to align it with the cache_disk and cache_key options from the _auth_ functions? It's not QUITE the same thing but feels similar.

I guess the difference here is that you could conceivably supply a file from some other source, whereas caching is more internal and automatic.

So after talking it out... I can't think of anything that makes more sense to me than req_cookie_file().

R/req-cookies.R Outdated Show resolved Hide resolved
R/req-cookies.R Outdated Show resolved Hide resolved
@mgirlich
Copy link
Collaborator

Basically, req_cookie_file() is fine but maybe something like req_cookie_preserve() would be easier to remember.

@hadley
Copy link
Member Author

hadley commented Aug 29, 2023

Oh I like req_cookie_preserve().

@hadley
Copy link
Member Author

hadley commented Aug 31, 2023

@jonthegeek the implementation here is pretty limited by what curl provides; it has to be written out to disk.

@hadley hadley merged commit bdecf71 into main Aug 31, 2023
12 checks passed
@hadley hadley deleted the cookie-jar branch August 31, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Share cookies across requests
3 participants