| File lib/ocaml/pkg-lib/netclient/http_client.cmi_pretty | GODI Package godi-ocamlnet |
| Library netclient |
| http_client.ml | Http_client.html | http_client.cmi_pretty | http_client.mli | Sources |
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 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 how_to_reconnect = 'a Http_client.how_to_reconnect = Send_again | Request_fails | Inquire of ('a -> bool) | Send_again_if_idem type 'a how_to_redirect = 'a Http_client.how_to_redirect = Redirect | Do_not_redirect | Redirect_inquire of ('a -> bool) | Redirect_if_idem type private_api = Http_client.private_api type response_body_storage = [ `Body of unit -> Netmime.mime_body | `File of unit -> string | `Memory ] type synchronization = Http_client.synchronization = Sync | Pipeline of int type resolver = Unixqueue.unix_event_system -> string -> (Unix.inet_addr option -> unit) -> unit type http_options = Http_client.http_options = { synchronization : 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 : resolver; configure_socket : Unix.file_descr -> unit; verbose_status : bool; verbose_request_header : bool; verbose_response_header : bool; verbose_request_contents : bool; verbose_response_contents : bool; verbose_connection : 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 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 : 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 has_req_body : bool method has_resp_body : bool method is_idempotent : bool method is_proxy_allowed : unit -> bool method is_served : bool method no_proxy : unit -> unit method private_api : private_api method proxy_enabled : 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_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_header : Netmime.mime_header -> unit method set_request_uri : string -> unit method set_response_body_storage : response_body_storage -> unit method status : status 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 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 has_req_body : bool method has_resp_body : bool method is_idempotent : bool method is_proxy_allowed : unit -> bool method is_served : bool method no_proxy : unit -> unit method private_api : private_api method proxy_enabled : 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_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_header : Netmime.mime_header -> unit method set_request_uri : string -> unit method set_response_body_storage : response_body_storage -> unit method status : status 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 domain : string list method password : string method realm : string method user : string end class type key_handler = object method inquire_key : domain:string list -> realms:string list -> auth:string -> key method invalidate_key : key -> unit end class key_ring : ?uplink:#key_handler -> unit -> object method add_key : key -> unit method clear : unit -> unit method inquire_key : domain:string list -> realms:string list -> auth:string -> key method invalidate_key : key -> unit method keys : key list end class type auth_session = object method auth_domain : string list method auth_in_advance : bool method auth_realm : string method auth_scheme : string method auth_user : string method authenticate : http_call -> (string * string) list method invalidate : http_call -> bool end class type auth_handler = object method create_session : http_call -> auth_session option end class basic_auth_handler : ?enable_auth_in_advance:bool -> #key_handler -> auth_handler class digest_auth_handler : ?enable_auth_in_advance:bool -> #key_handler -> auth_handler class basic_auth_method : object method as_auth_handler : auth_handler method name : string method set_realm : string -> string -> string -> unit end class digest_auth_method : basic_auth_method type connection_cache = Http_client.connection_cache val close_connection_cache : connection_cache -> unit val create_restrictive_cache : unit -> connection_cache val create_aggressive_cache : unit -> connection_cache class pipeline : object method add : http_call -> unit method add_auth_handler : auth_handler -> unit method add_authentication_method : basic_auth_method -> unit method add_with_callback : http_call -> (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 connection_cache : connection_cache method connections : (string * int * int) list method event_system : Unixqueue.event_system method get_options : http_options method number_of_open_connections : int method number_of_open_messages : int method reset : unit -> unit method reset_counters : unit -> unit method run : unit -> unit method set_connection_cache : connection_cache -> unit method set_event_system : Unixqueue.event_system -> unit method set_options : http_options -> unit method set_proxy : string -> int -> unit method set_proxy_auth : string -> string -> unit method set_proxy_from_environment : unit -> unit end module Convenience : sig val http_trials : int ref val http_user : string ref val http_password : string ref val http_get_message : string -> http_call val http_head_message : string -> http_call val http_post_message : string -> (string * string) list -> http_call val http_put_message : string -> string -> http_call val http_delete_message : string -> 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 : unit -> unit end val init_mt : create_lock_unlock_pair:(unit -> (unit -> unit) * (unit -> unit)) -> unit