diff options
| author | 2023-03-27 20:56:50 -0400 | |
|---|---|---|
| committer | 2023-03-27 20:56:50 -0400 | |
| commit | ab9591a4b7d1d576c48c6886c74c9671bc943f9c (patch) | |
| tree | 249ac01f786e1b5e3f5766c0a19d9f03231790ba | |
| parent | native: correct classification mistake (diff) | |
janet: pass in cookies
| -rw-r--r-- | jurl/init.janet | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jurl/init.janet b/jurl/init.janet index 58b76c0..156a9c8 100644 --- a/jurl/init.janet +++ b/jurl/init.janet @@ -21,6 +21,8 @@ (var *default-options* "Default options to assign to handles automatically created by request." @{:autoreferer true + # this activates the cookie parser in curl + :cookiefile "" :default-protocol "https" :followlocation true :postredir :redir-post/all @@ -207,9 +209,9 @@ (def curlcode (:perform handle)) - # cookies are complicated for many reasons - # combine :cookielist and (:headers :set-cookie) to handle yourself + # TODO: cookie list to map, merge given cookies if any {:body (if (function? stream) :unavail res-body) + :cookies (handle :cookielist) :error curlcode :handle handle :headers (text/parse-headers res-hdr) |
