aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-03-28 09:57:47 -0400
committerChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-03-28 09:57:47 -0400
commit05332c28449747231c33e7410213ac2edc636d54 (patch)
tree3e7adc7ffc2c9c4a0e137f2cb284b993dcec8d43
parentjanet: initial fancy api preview (diff)
janet: move handle into request as client
-rw-r--r--jurl/init.janet6
1 files changed, 4 insertions, 2 deletions
diff --git a/jurl/init.janet b/jurl/init.janet
index d4743a5..70d28e7 100644
--- a/jurl/init.janet
+++ b/jurl/init.janet
@@ -67,6 +67,8 @@
non-recursively.
The effective result is similar to passing bytes otherwise.
* `[...]` equivalent to (mime/new ...) without needing to import jurl/mime.
+ * client: a handle to a <jurl> abstract type, gotten from jurl/native/new.
+ If this is specified, default options are not applied.
* cookies: a dictionary of cookies to give to curl.
* headers: a dictionary of headers to give to curl.
Any given header value may be a list, in which case multiple headers will
@@ -121,14 +123,14 @@
````
[{:auth auth
:body body
+ :client handle
:cookies cookies
:headers headers
:method method
:options options
:query query
:stream stream
- :url url}
- &opt handle]
+ :url url}]
(assert (bytes? url) "url must be present and a string")
(def handle (or handle