@@ -118,6 +118,20 @@ module type CURL = sig
118
118
val perform : Curl .t -> Curl .curlCode t
119
119
end
120
120
121
+ type ('body,'ret) http_request_ =
122
+ ?ua:string ->
123
+ ?timeout:int ->
124
+ ?verbose:bool ->
125
+ ?setup:(Curl .t -> unit ) ->
126
+ ?timer:Action .timer ->
127
+ ?max_size:int ->
128
+ ?http_1_0:bool ->
129
+ ?headers:string list ->
130
+ ?body:'body ->
131
+ http_action -> string -> 'ret
132
+
133
+ type 'ret http_request = ([ `Form of (string * string ) list | `Raw of string * string ], 'ret ) http_request_
134
+
121
135
module type HTTP = sig
122
136
module IO : IO_TYPE
123
137
val with_curl : (Curl .t -> 'a IO .t ) -> 'a IO .t
@@ -130,24 +144,13 @@ module type HTTP = sig
130
144
?result : (Curl .t -> Curl .curlCode -> unit IO .t ) ->
131
145
string -> [ `Error of Curl .curlCode | `Ok of int * string ] IO .t
132
146
133
- type ('body,'ret) http_request_ =
134
- ?ua:string ->
135
- ?timeout:int ->
136
- ?verbose:bool ->
137
- ?setup:(Curl .t -> unit ) ->
138
- ?timer:Action .timer ->
139
- ?max_size:int ->
140
- ?http_1_0:bool ->
141
- ?headers:string list ->
142
- ?body:'body ->
143
- http_action -> string -> 'ret IO .t
144
-
145
- type 'ret http_request = ([ `Form of (string * string ) list | `Raw of string * string ], 'ret ) http_request_
147
+ type ('body,'ret) request_ = ('body ,'ret IO .t ) http_request_
148
+ type 'ret request = 'ret IO .t http_request
146
149
147
- val http_request' : [> `Error of Curl .curlCode | `Ok of int * string ] http_request
148
- val http_request : [> `Error of string | `Ok of string ] http_request
149
- val http_request_exn : string http_request
150
- val http_query : (string * string , [> `Error of string | `Ok of string ]) http_request_
150
+ val http_request' : [> `Error of Curl .curlCode | `Ok of int * string ] request
151
+ val http_request : [> `Error of string | `Ok of string ] request
152
+ val http_request_exn : string request
153
+ val http_query : (string * string , [> `Error of string | `Ok of string ]) request_
151
154
val http_submit :
152
155
?ua : string ->
153
156
?timeout : int ->
@@ -175,19 +178,8 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with
175
178
176
179
module IO = IO
177
180
178
- type ('body,'ret) http_request_ =
179
- ?ua:string ->
180
- ?timeout:int ->
181
- ?verbose:bool ->
182
- ?setup:(Curl .t -> unit ) ->
183
- ?timer:Action .timer ->
184
- ?max_size:int ->
185
- ?http_1_0:bool ->
186
- ?headers:string list ->
187
- ?body:'body ->
188
- http_action -> string -> 'ret IO .t
189
-
190
- type 'ret http_request = ([ `Form of (string * string ) list | `Raw of string * string ], 'ret ) http_request_
181
+ type ('body,'ret) request_ = ('body ,'ret IO .t ) http_request_
182
+ type 'ret request = 'ret IO .t http_request
191
183
192
184
open IO
193
185
0 commit comments