Open orirawlings opened 5 years ago
Looks like #31 was opened between when I originally developed this and worked through legal department at my employer. I think either solution would address my use case. Hopefully, one of them can be integrated. :)
cc @rogpeppe
I need this
Fixes #29
This PR adds a new option,
PersistSessionCookies
to theOption
struct. This allows users to persist both cookies with an expiry time, and those without. By default session cookies are not persisted (which matches current behavior), nor will any session cookies that appear in the serialized cookies on disk be loaded into the jar.This PR is motivated by usage of the library within command line tools. In the motivating cases, the user might execute a series of separate commands in their terminal. Each command runs as a separate OS process, so they do not share memory, but they still span a logical session with a web API. Allowing session cookies to be persisted allows that session to continue over the sequence of commands.