gql icon indicating copy to clipboard operation
gql copied to clipboard

Handle cookies

Open jeromedalbert opened this issue 5 years ago • 0 comments

Is it possible to handle cookies in the same manner as curl?

Some relevant extracts from curl's man page:

       -c, --cookie-jar <filename>
              (HTTP) Specify to which file you want curl to write all cookies after a completed operation. 

       -b, --cookie <data>
              (HTTP) Pass the data to the HTTP server in the Cookie header. It is supposedly the data previously received from the server in a
              "Set-Cookie:" line.  The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".

              If no '=' symbol is used in the argument, it is instead treated as a filename to read previously stored cookie from. 

              ...

              Users very often want to both read cookies from a file and write updated cookies back to a file, so using both -b, --cookie  and
              -c, --cookie-jar in the same command line is common.

The graphql API I work with only works with cookies, so if I could somehow read/write cookies from a file, that would help a lot.

jeromedalbert avatar Jan 16 '19 05:01 jeromedalbert