about summary refs log tree commit diff stats
path: root/src/loader/curlhandle.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/loader/curlhandle.nim')
-rw-r--r--src/loader/curlhandle.nim32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/loader/curlhandle.nim b/src/loader/curlhandle.nim
deleted file mode 100644
index 3c69c6c0..00000000
--- a/src/loader/curlhandle.nim
+++ /dev/null
@@ -1,32 +0,0 @@
-import bindings/curl
-import loader/headers
-import loader/loaderhandle
-import loader/request
-
-type
-  CurlHandle* = ref object of RootObj
-    curl*: CURL
-    statusline*: bool
-    headers*: Headers
-    request*: Request
-    handle*: LoaderHandle
-    mime*: curl_mime
-    slist*: curl_slist
-    finish*: proc(handle: CurlHandle)
-
-func newCurlHandle*(curl: CURL, request: Request, handle: LoaderHandle):
-    CurlHandle =
-  return CurlHandle(
-    headers: newHeaders(),
-    curl: curl,
-    handle: handle,
-    request: request
-  )
-
-proc cleanup*(handleData: CurlHandle) =
-  handleData.handle.close()
-  if handleData.mime != nil:
-    curl_mime_free(handleData.mime)
-  if handleData.slist != nil:
-    curl_slist_free_all(handleData.slist)
-  curl_easy_cleanup(handleData.curl)