diff --git a/src/Hermes.re b/src/Hermes.re index aa9df86..c3d410a 100644 --- a/src/Hermes.re +++ b/src/Hermes.re @@ -64,13 +64,14 @@ let send: ~url, ~method= switch (client.method) { - | POST => "Post" - | GET => "Get" - | PUT => "Put" - | PATCH => "Patch" - | DELETE => "Delete" - | HEAD => "Head" - | OPTIONS => "Options" + | OPTIONS => "OPTIONS" + | GET => "GET" + | HEAD => "HEAD" + | POST => "POST" + | PUT => "PUT" + | DELETE => "DELETE" + | TRACE => "TRACE" + | CONNECT => "CONNECT" }, (), ); diff --git a/src/Hermes/Hermes_Method.re b/src/Hermes/Hermes_Method.re index 4276d7a..2a7ba77 100644 --- a/src/Hermes/Hermes_Method.re +++ b/src/Hermes/Hermes_Method.re @@ -1,9 +1,17 @@ open Hermes_Types_Method; +let options = (url: string) => { + Hermes_Client.make(~url, ~method=OPTIONS); +}; + let get = (url: string) => { Hermes_Client.make(~url, ~method=GET); }; +let head = (url: string) => { + Hermes_Client.make(~url, ~method=HEAD); +}; + let post = (url: string) => { Hermes_Client.make(~url, ~method=POST); }; @@ -12,18 +20,14 @@ let put = (url: string) => { Hermes_Client.make(~url, ~method=PUT); }; -let patch = (url: string) => { - Hermes_Client.make(~url, ~method=PATCH); -}; - let delete = (url: string) => { Hermes_Client.make(~url, ~method=DELETE); }; -let head = (url: string) => { - Hermes_Client.make(~url, ~method=HEAD); +let trace = (url: string) => { + Hermes_Client.make(~url, ~method=TRACE); }; -let options = (url: string) => { - Hermes_Client.make(~url, ~method=OPTIONS); +let connect = (url: string) => { + Hermes_Client.make(~url, ~method=CONNECT); }; \ No newline at end of file diff --git a/src/Hermes/Hermes_Method.rei b/src/Hermes/Hermes_Method.rei index c179c2f..73eab04 100644 --- a/src/Hermes/Hermes_Method.rei +++ b/src/Hermes/Hermes_Method.rei @@ -1,16 +1,20 @@ +let options: + string => + Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); + let get: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); -let post: +let head: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); -let put: +let post: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); -let patch: +let put: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); @@ -18,10 +22,10 @@ let delete: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); -let head: +let trace: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); -let options: +let connect: string => Hermes_Types_Client.t(Hermes_Types_ResponseType.payload(option(string))); \ No newline at end of file diff --git a/src/Hermes/Types/Hermes_Types_Method.re b/src/Hermes/Types/Hermes_Types_Method.re index 7c99e40..65bf81e 100644 --- a/src/Hermes/Types/Hermes_Types_Method.re +++ b/src/Hermes/Types/Hermes_Types_Method.re @@ -1,8 +1,9 @@ type t = + | OPTIONS | GET + | HEAD | POST | PUT - | PATCH | DELETE - | HEAD - | OPTIONS; \ No newline at end of file + | TRACE + | CONNECT; \ No newline at end of file