diff options
| author | Adelyn Breelove <[email protected]> | 2018-11-29 12:55:10 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2018-11-29 12:55:10 -0700 |
| commit | 473072f66e6c7e228b4f26730cbc7304941fb12b (patch) | |
| tree | cd689e7f53bafbf357c8be88e317251b2a4b7539 /lib/s.ml | |
| parent | Clean up a bit (diff) | |
| download | disml-473072f66e6c7e228b4f26730cbc7304941fb12b.tar.xz disml-473072f66e6c7e228b4f26730cbc7304941fb12b.zip | |
functors!
Diffstat (limited to 'lib/s.ml')
| -rw-r--r-- | lib/s.ml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/s.ml b/lib/s.ml new file mode 100644 index 0000000..92259a0 --- /dev/null +++ b/lib/s.ml @@ -0,0 +1,31 @@ +open Async +open Cohttp + +module type Token = sig + val token : string +end + +module type Http = sig + module Base : sig + exception Invalid_Method + + val base_url : string + + val process_url : string -> Uri.t + val process_request_body : Yojson.Basic.json -> Cohttp_async.Body.t + val process_request_headers : unit -> Headers.t + + val process_response : + Cohttp_async.Response.t * Cohttp_async.Body.t -> + Yojson.Basic.json + + val request : + ?body:Yojson.Basic.json -> + [ `Delete | `Get | `Patch | `Post | `Put ] -> + string -> + Yojson.Basic.json Deferred.t + end + + (* TODO add abstraction sigs *) + val token : string +end
\ No newline at end of file |