diff options
Diffstat (limited to 'lib/http.ml')
| -rw-r--r-- | lib/http.ml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/http.ml b/lib/http.ml index 8cc56fb..6f14a22 100644 --- a/lib/http.ml +++ b/lib/http.ml @@ -1,7 +1,6 @@ -open Async -open Cohttp - module Make(T : S.Token) = struct + open Async + open Cohttp include T module Base = struct @@ -18,7 +17,7 @@ module Make(T : S.Token) = struct |> Cohttp_async.Body.of_string let process_request_headers () = - let h = Header.init () in + let h = Header.init () in Header.add_list h [ "User-Agent", "Dis.ml v0.1.0"; "Authorization", ("Bot " ^ token); @@ -26,7 +25,7 @@ module Make(T : S.Token) = struct ] (* TODO Finish processor *) - let process_response (_resp, body) = + let process_response ((_resp:Response.t), body) = body |> Cohttp_async.Body.to_string >>| Yojson.Basic.from_string let request ?(body=`Null) m path = |