Skip to content

Implement req_cookie_file()#282

Merged
hadley merged 12 commits intomainfrom
cookie-jar
Aug 31, 2023
Merged

Implement req_cookie_file()#282
hadley merged 12 commits intomainfrom
cookie-jar

Conversation

@hadley
Copy link
Copy Markdown
Member

@hadley hadley commented Aug 21, 2023

Fixes #223

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

hadley commented Aug 23, 2023

@mgirlich what do you think of the name?

Copy link
Copy Markdown
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().

Comment thread R/req-cookies.R Outdated
Comment thread R/req-cookies.R Outdated
@mgirlich
Copy link
Copy Markdown
Collaborator

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

@hadley
Copy link
Copy Markdown
Member Author

hadley commented Aug 29, 2023

Oh I like req_cookie_preserve().

hadley and others added 3 commits September 1, 2023 08:16
Co-authored-by: Maximilian Girlich <maximilian.girlich@metoda.com>
@hadley
Copy link
Copy Markdown
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
@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