summary refs log tree commit diff stats
path: root/examples/curlex.nim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/curlex.nim')
-rw-r--r--examples/curlex.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/curlex.nim b/examples/curlex.nim
new file mode 100644
index 000000000..7f666f775
--- /dev/null
+++ b/examples/curlex.nim
@@ -0,0 +1,10 @@
+import 
+  libcurl
+
+var hCurl = curl_easy_init()
+if hCurl != nil: 
+  discard curl_easy_setopt(hCurl, CURLOPT_VERBOSE, True)
+  discard curl_easy_setopt(hCurl, CURLOPT_URL, "http://force7.de/nimrod")
+  discard curl_easy_perform(hCurl)
+  curl_easy_cleanup(hCurl)
+