diff options
Diffstat (limited to 'adapter/protocol/curlwrap.nim')
-rw-r--r-- | adapter/protocol/curlwrap.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/adapter/protocol/curlwrap.nim b/adapter/protocol/curlwrap.nim new file mode 100644 index 00000000..7aef4182 --- /dev/null +++ b/adapter/protocol/curlwrap.nim @@ -0,0 +1,10 @@ +import bindings/curl + +template setopt*(curl: CURL, opt: CURLoption, arg: typed) = + discard curl_easy_setopt(curl, opt, arg) + +template setopt*(curl: CURL, opt: CURLoption, arg: string) = + discard curl_easy_setopt(curl, opt, cstring(arg)) + +template getinfo*(curl: CURL, info: CURLINFO, arg: typed) = + discard curl_easy_getinfo(curl, info, arg) |