module Http_client: sig
.. end
Using Ocsigen as a HTTP client
val get : ?https:bool ->
?port:int -> host:string -> uri:string -> unit -> Http_frame.t Lwt.t
EXPERIMENTAL -- May evolve in the future. Do a GET HTTP request.
The default port is 80 for HTTP, 443 for HTTPS.
The default protocol is http (https=false
).
val raw_request : ?headers:Http_headers.t ->
?https:bool ->
?port:int ->
?content:string Ocsistream.t ->
http_method:Http_frame.Http_header.http_method ->
host:string ->
inet_addr:Unix.inet_addr -> uri:string -> unit -> Http_frame.t Lwt.t
EXPERIMENTAL -- Will evolve in the future.
Do an HTTP request (low level).
If the optional argument headers
is present, no headers will be
added by Ocsigen, but those in this argument and host, and
connection: close
.
No way to do Keep-alive
for now.
Be carefull to respect HTTP/1.1 in this case!
The default port is 80 for HTTP, 443 for HTTPS.
The default protocol is http (https=false
).