diff options
| author | Mishio595 <[email protected]> | 2018-11-29 18:10:45 -0700 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-11-29 18:10:45 -0700 |
| commit | eaccd45894e5b519bca82662d0b950b5f1d9c598 (patch) | |
| tree | 0d08c556ca3a0399c0be1169d5f0da57b618812b /lib/http.ml | |
| parent | Try to make it a more properly structured lib (diff) | |
| download | disml-eaccd45894e5b519bca82662d0b950b5f1d9c598.tar.xz disml-eaccd45894e5b519bca82662d0b950b5f1d9c598.zip | |
Fix all the errors from coding without merlin
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 = |