`sig
exception Bad_message of string
exception No_reply
exception Too_many_redirections
exception Name_resolution_error of string
exception URL_syntax_error of string
exception Timeout of string
exception Proxy_error of int
exception Response_too_large
exception Http_protocol of exn
exception Http_error of (int * string)
type status =
[ `Client_error
| `Http_protocol_error of exn
| `Redirection
| `Server_error
| `Successful
| `Unserved ]
type 'a auth_status =
[ `Auth_error
| `Continue of 'a
| `Continue_reroute of 'a * int
| `None
| `OK
| `Reroute of int ]
type 'message_class how_to_reconnect =
Send_again
| Request_fails
| Inquire of ('message_class -> bool)
| Send_again_if_idem
type 'message_class how_to_redirect =
Redirect
| Do_not_redirect
| Redirect_inquire of ('message_class -> bool)
| Redirect_if_idem
type private_api
type response_body_storage =
[ `Body of unit -> Netmime.mime_body
| `Device of unit -> Uq_io.out_device
| `File of unit -> string
| `Memory ]
type synchronization = Sync | Pipeline of int
type resolver =
Unixqueue.unix_event_system ->
string -> (Unix.inet_addr option -> unit) -> unit
type transport_layer_id = int
type http_options = {
synchronization : Nethttp_client.synchronization;
maximum_connection_failures : int;
maximum_message_errors : int;
inhibit_persistency : bool;
connection_timeout : float;
number_of_parallel_connections : int;
maximum_redirections : int;
handshake_timeout : float;
resolver : Nethttp_client.resolver;
configure_socket : Unix.file_descr -> unit;
tls : Netsys_crypto_types.tls_config option;
schemes :
(string * Neturl.url_syntax * int option *
Nethttp_client.transport_layer_id)
list;
verbose_status : bool;
verbose_request_header : bool;
verbose_response_header : bool;
verbose_request_contents : bool;
verbose_response_contents : bool;
verbose_connection : bool;
verbose_events : bool;
}
type header_kind = [ `Base | `Effective ]
class type http_call =
object
method assoc_multi_req_header : string -> string list
method assoc_multi_resp_header : string -> string list
method assoc_req_header : string -> string
method assoc_resp_header : string -> string
method auth_status : unit Nethttp_client.auth_status
method dest_status : unit -> string * int * string
method effective_request_uri : string
method empty_path_replacement : string
method get_host : unit -> string
method get_path : unit -> string
method get_port : unit -> int
method get_reconnect_mode :
Nethttp_client.http_call Nethttp_client.how_to_reconnect
method get_redirect_mode :
Nethttp_client.http_call Nethttp_client.how_to_redirect
method get_req_body : unit -> string
method get_req_header : unit -> (string * string) list
method get_req_method : unit -> string
method get_resp_body : unit -> string
method get_resp_header : unit -> (string * string) list
method get_uri : unit -> string
method gssapi_props : Netsys_gssapi.client_props option
method has_req_body : bool
method has_resp_body : bool
method is_idempotent : bool
method is_proxy_allowed : unit -> bool
method is_served : bool
method max_response_body_length : int64
method no_proxy : unit -> unit
method private_api : Nethttp_client.private_api
method proxy_enabled : bool
method proxy_use_connect : bool
method request_body : Netmime.mime_body
method request_header :
Nethttp_client.header_kind -> Netmime.mime_header
method request_method : string
method request_uri : string
method response_body : Netmime.mime_body
method response_body_storage : Nethttp_client.response_body_storage
method response_header : Netmime.mime_header
method response_protocol : string
method response_status : Nethttp.http_status
method response_status_code : int
method response_status_text : string
method same_call : unit -> Nethttp_client.http_call
method set_accept_encoding : unit -> unit
method set_chunked_request : unit -> unit
method set_expect_handshake : unit -> unit
method set_max_response_body_length : int64 -> unit
method set_proxy_enabled : bool -> unit
method set_reconnect_mode :
Nethttp_client.http_call Nethttp_client.how_to_reconnect -> unit
method set_redirect_mode :
Nethttp_client.http_call Nethttp_client.how_to_redirect -> unit
method set_req_header : string -> string -> unit
method set_request_body : Netmime.mime_body -> unit
method set_request_device : (unit -> Uq_io.in_device) -> unit
method set_request_header : Netmime.mime_header -> unit
method set_request_uri : string -> unit
method set_response_body_storage :
Nethttp_client.response_body_storage -> unit
method set_transport_layer : Nethttp_client.transport_layer_id -> unit
method status : Nethttp_client.status
method tls_session_props : Nettls_support.tls_session_props option
end
class type tls_cache =
object
method clear : unit -> unit
method get :
domain:string ->
port:int -> trans:Nethttp_client.transport_layer_id -> string
method set :
domain:string ->
port:int ->
trans:Nethttp_client.transport_layer_id -> data:string -> unit
end
val null_tls_cache : unit -> Nethttp_client.tls_cache
val unlim_tls_cache : unit -> Nethttp_client.tls_cache
class type transport_channel_type =
object
method continue :
Unix.file_descr ->
Nethttp_client.transport_layer_id ->
float ->
exn ->
string ->
int ->
Unixqueue.event_system ->
exn option -> Uq_engines.multiplex_controller
method default_port : int option
method identify_conn_by_name : bool
method setup_e :
Unix.file_descr ->
Nethttp_client.transport_layer_id ->
float ->
exn ->
string ->
int ->
Unixqueue.event_system ->
Nethttp_client.tls_cache ->
Uq_engines.multiplex_controller Uq_engines.engine
end
class virtual generic_call :
object
method assoc_multi_req_header : string -> string list
method assoc_multi_resp_header : string -> string list
method assoc_req_header : string -> string
method assoc_resp_header : string -> string
method auth_status : unit auth_status
method private virtual def_empty_path_replacement : string
method private virtual def_has_req_body : bool
method private virtual def_has_resp_body : bool
method private virtual def_is_idempotent : bool
method private virtual def_request_method : string
method dest_status : unit -> string * int * string
method effective_request_uri : string
method empty_path_replacement : string
method private virtual fixup_request : unit -> unit
method get_host : unit -> string
method get_path : unit -> string
method get_port : unit -> int
method get_reconnect_mode : http_call how_to_reconnect
method get_redirect_mode : http_call how_to_redirect
method get_req_body : unit -> string
method get_req_header : unit -> (string * string) list
method get_req_method : unit -> string
method get_resp_body : unit -> string
method get_resp_header : unit -> (string * string) list
method get_uri : unit -> string
method gssapi_props : Netsys_gssapi.client_props option
method has_req_body : bool
method has_resp_body : bool
method is_idempotent : bool
method is_proxy_allowed : unit -> bool
method is_served : bool
method max_response_body_length : int64
method no_proxy : unit -> unit
method private_api : private_api
method proxy_enabled : bool
method proxy_use_connect : bool
method request_body : Netmime.mime_body
method request_header : header_kind -> Netmime.mime_header
method request_method : string
method request_uri : string
method response_body : Netmime.mime_body
method response_body_storage : response_body_storage
method response_header : Netmime.mime_header
method response_protocol : string
method response_status : Nethttp.http_status
method response_status_code : int
method response_status_text : string
method same_call : unit -> http_call
method set_accept_encoding : unit -> unit
method set_chunked_request : unit -> unit
method set_expect_handshake : unit -> unit
method set_max_response_body_length : int64 -> unit
method set_proxy_enabled : bool -> unit
method set_reconnect_mode : http_call how_to_reconnect -> unit
method set_redirect_mode : http_call how_to_redirect -> unit
method set_req_header : string -> string -> unit
method set_request_body : Netmime.mime_body -> unit
method set_request_device : (unit -> Uq_io.in_device) -> unit
method set_request_header : Netmime.mime_header -> unit
method set_request_uri : string -> unit
method set_response_body_storage : response_body_storage -> unit
method set_transport_layer : transport_layer_id -> unit
method status : status
method tls_session_props : Nettls_support.tls_session_props option
end
class get_call : http_call
class trace_call : http_call
class options_call : http_call
class head_call : http_call
class post_call : http_call
class put_call : http_call
class delete_call : http_call
class get : string -> http_call
class trace : string -> int -> http_call
class options : string -> http_call
class head : string -> http_call
class post : string -> (string * string) list -> http_call
class post_raw : string -> string -> http_call
class put : string -> string -> http_call
class delete : string -> http_call
class type key =
object
method credentials : (string * string * (string * string) list) list
method domain : Neturl.url list
method password : string
method realm : string
method user : string
end
val key :
user:string ->
password:string ->
realm:string -> domain:Neturl.url list -> Nethttp_client.key
val key_creds :
user:string ->
creds:(string * string * (string * string) list) list ->
Nethttp_client.http_options -> Nethttp_client.key
class type key_handler =
object
method inquire_key :
domain:Neturl.url option ->
realm:string -> auth:string -> Nethttp_client.key
method invalidate_key : Nethttp_client.key -> unit
end
class key_ring :
?uplink:#Nethttp_client.key_handler ->
?no_invalidation:bool ->
unit ->
object
method add_key : Nethttp_client.key -> unit
method clear : unit -> unit
method inquire_key :
domain:Neturl.url option -> realm:string -> auth:string -> key
method invalidate_key : key -> unit
method keys : Nethttp_client.key list
end
class type auth_session =
object
method auth_domain : Neturl.url list * int
method auth_realm : string
method auth_scheme : string
method auth_session_id : string option
method auth_user : string
method authenticate :
Nethttp_client.http_call ->
bool -> (string * string) list Nethttp_client.auth_status
method invalidate : Nethttp_client.http_call -> unit
end
class type auth_handler =
object
method create_proxy_session :
Nethttp_client.http_call ->
Nethttp_client.http_options Stdlib.ref ->
Nethttp_client.auth_session option
method create_session :
secure:bool ->
Nethttp_client.http_call ->
Nethttp_client.http_options Stdlib.ref ->
Nethttp_client.auth_session option
method identify_proxy_session :
Nethttp_client.http_call ->
Nethttp_client.http_options Stdlib.ref ->
(string * string * string * int) option
method identify_session :
Nethttp_client.http_call ->
Nethttp_client.http_options Stdlib.ref ->
(string * string * string * int) option
method skip_challenge : bool
method skip_challenge_session :
Nethttp_client.http_call ->
Nethttp_client.http_options Stdlib.ref ->
Nethttp_client.auth_session option
end
class basic_auth_handler :
?enable_reauth:bool ->
?skip_challenge:bool -> #Nethttp_client.key_handler -> auth_handler
class digest_auth_handler : #Nethttp_client.key_handler -> auth_handler
class unified_auth_handler :
?insecure:bool -> #Nethttp_client.key_handler -> auth_handler
class generic_auth_handler :
#Nethttp_client.key_handler ->
(module Nethttp.HTTP_CLIENT_MECHANISM) list -> auth_handler
type connection_cache = Nethttp_client_conncache.connection_cache
val close_connection_cache : Nethttp_client.connection_cache -> unit
val create_restrictive_cache : unit -> Nethttp_client.connection_cache
val create_aggressive_cache : unit -> Nethttp_client.connection_cache
val http_trans_id : Nethttp_client.transport_layer_id
val https_trans_id : Nethttp_client.transport_layer_id
val spnego_trans_id : Nethttp_client.transport_layer_id
val proxy_only_trans_id : Nethttp_client.transport_layer_id
val new_trans_id : unit -> Nethttp_client.transport_layer_id
val http_transport_channel_type : Nethttp_client.transport_channel_type
val https_transport_channel_type :
Netsys_crypto_types.tls_config -> Nethttp_client.transport_channel_type
type proxy_type = [ `Http_proxy | `Socks5 ]
class pipeline :
object
method add : Nethttp_client.http_call -> unit
method add_auth_handler : Nethttp_client.auth_handler -> unit
method add_e :
Nethttp_client.http_call ->
Nethttp_client.http_call Uq_engines.engine
method add_with_callback :
Nethttp_client.http_call ->
(Nethttp_client.http_call -> unit) -> unit
method avoid_proxy_for : string list -> unit
method cnt_crashed_connections : int
method cnt_failed_connections : int
method cnt_new_connections : int
method cnt_server_eof_connections : int
method cnt_successful_connections : int
method cnt_timed_out_connections : int
method configure_transport :
Nethttp_client.transport_layer_id ->
Nethttp_client.transport_channel_type -> unit
method connection_cache : Nethttp_client.connection_cache
method connections : (string * int * int) list
method event_system : Unixqueue.event_system
method get_options : Nethttp_client.http_options
method number_of_open_connections : int
method number_of_open_messages : int
method proxy_type : string -> Nethttp_client.proxy_type option
method proxy_type_of_call :
Nethttp_client.http_call -> Nethttp_client.proxy_type option
method reset : unit -> unit
method reset_counters : unit -> unit
method run : unit -> unit
method set_connection_cache : Nethttp_client.connection_cache -> unit
method set_event_system : Unixqueue.event_system -> unit
method set_options : Nethttp_client.http_options -> unit
method set_proxy : string -> int -> unit
method set_proxy_auth : insecure:bool -> string -> string -> unit
method set_proxy_from_environment : insecure:bool -> unit -> unit
method set_socks5_proxy : string -> int -> unit
method set_tls_cache : Nethttp_client.tls_cache -> unit
method set_transport_proxy :
Nethttp_client.transport_layer_id ->
string ->
int ->
(string * string * bool) option -> Nethttp_client.proxy_type -> unit
method set_transport_proxy_from_environment :
insecure:bool ->
(string * Nethttp_client.transport_layer_id) list -> unit
method transport_layer :
Nethttp_client.http_call -> Nethttp_client.transport_layer_id
end
val parse_proxy_setting :
insecure:bool -> string -> string * int * (string * string * bool) option
val parse_no_proxy : string -> string list
module Convenience :
sig
val http_trials : int Stdlib.ref
val http_user : string Stdlib.ref
val http_password : string Stdlib.ref
val configure : ?insecure:bool -> unit -> unit
val configure_pipeline : (Nethttp_client.pipeline -> unit) -> unit
val http_get_message : string -> Nethttp_client.http_call
val http_head_message : string -> Nethttp_client.http_call
val http_post_message :
string -> (string * string) list -> Nethttp_client.http_call
val http_put_message : string -> string -> Nethttp_client.http_call
val http_delete_message : string -> Nethttp_client.http_call
val http_get : string -> string
val http_post : string -> (string * string) list -> string
val http_put : string -> string -> string
val http_delete : string -> string
val http_verbose :
?verbose_status:bool ->
?verbose_request_header:bool ->
?verbose_response_header:bool ->
?verbose_request_contents:bool ->
?verbose_response_contents:bool ->
?verbose_connection:bool -> ?verbose_events:bool -> unit -> unit
end
module Debug : sig val enable : bool Stdlib.ref end
end`