aboutsummaryrefslogtreecommitdiff
path: root/lib/http.ml
diff options
context:
space:
mode:
authorMishio595 <[email protected]>2018-11-18 12:04:19 -0700
committerMishio595 <[email protected]>2018-11-18 12:04:19 -0700
commita7340eba42bcef93a4e6f9ece7c86043f9a01747 (patch)
tree7ec65e89673ad8d9e70b12482206e27e9fa77704 /lib/http.ml
parentRewrite from Lwt to Async (diff)
downloaddisml-a7340eba42bcef93a4e6f9ece7c86043f9a01747.tar.xz
disml-a7340eba42bcef93a4e6f9ece7c86043f9a01747.zip
Event dispatch and client abstraction
Diffstat (limited to 'lib/http.ml')
-rw-r--r--lib/http.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/http.ml b/lib/http.ml
index dbef903..8d0b679 100644
--- a/lib/http.ml
+++ b/lib/http.ml
@@ -1,6 +1,5 @@
open Async
open Cohttp
-open Cohttp_async
module Base = struct
exception Invalid_Method
@@ -34,11 +33,11 @@ module Base = struct
let headers = process_request_headers () in
let body = process_request_body body in
(match m with
- | `DELETE -> Client.delete ~headers ~body uri
- | `GET -> Client.get ~headers uri
- | `PATCH -> Client.patch ~headers ~body uri
- | `POST -> Client.post ~headers ~body uri
- | `PUT -> Client.put ~headers ~body uri
+ | `DELETE -> Cohttp_async.Client.delete ~headers ~body uri
+ | `GET -> Cohttp_async.Client.get ~headers uri
+ | `PATCH -> Cohttp_async.Client.patch ~headers ~body uri
+ | `POST -> Cohttp_async.Client.post ~headers ~body uri
+ | `PUT -> Cohttp_async.Client.put ~headers ~body uri
| _ -> raise Invalid_Method)
>>= process_response
end