package ocaml-http

  1. Overview
  2. Docs
type version = [
  1. | `HTTP_1_0
  2. | `HTTP_1_1
]
type meth = [
  1. | `GET
  2. | `POST
]
type daemon_mode = [
  1. | `Fork
  2. | `Single
  3. | `Thread
]
type tcp_server = sockaddr:Unix.sockaddr -> timeout:int option -> (Pervasives.in_channel -> Pervasives.out_channel -> unit) -> unit
type auth_info = [
  1. | `Basic of string * string
]
type informational_substatus = [
  1. | `Continue
  2. | `Switching_protocols
]
type success_substatus = [
  1. | `Accepted
  2. | `Created
  3. | `No_content
  4. | `Non_authoritative_information
  5. | `OK
  6. | `Partial_content
  7. | `Reset_content
]
type redirection_substatus = [
  1. | `Found
  2. | `Moved_permanently
  3. | `Multiple_choices
  4. | `Not_modified
  5. | `See_other
  6. | `Temporary_redirect
  7. | `Use_proxy
]
type client_error_substatus = [
  1. | `Bad_request
  2. | `Conflict
  3. | `Expectation_failed
  4. | `Forbidden
  5. | `Gone
  6. | `Length_required
  7. | `Method_not_allowed
  8. | `Not_acceptable
  9. | `Not_found
  10. | `Payment_required
  11. | `Precondition_failed
  12. | `Proxy_authentication_required
  13. | `Request_URI_too_large
  14. | `Request_entity_too_large
  15. | `Request_time_out
  16. | `Requested_range_not_satisfiable
  17. | `Unauthorized
  18. | `Unsupported_media_type
]
type server_error_substatus = [
  1. | `Bad_gateway
  2. | `Gateway_time_out
  3. | `HTTP_version_not_supported
  4. | `Internal_server_error
  5. | `Not_implemented
  6. | `Service_unavailable
]
type informational_status = [
  1. | `Informational of informational_substatus
]
type success_status = [
  1. | `Success of success_substatus
]
type redirection_status = [
  1. | `Redirection of redirection_substatus
]
type client_error_status = [
  1. | `Client_error of client_error_substatus
]
type server_error_status = [
  1. | `Server_error of server_error_substatus
]
type error_status = [
  1. | `Client_error of client_error_substatus
  2. | `Server_error of server_error_substatus
]
type status = [
  1. | `Client_error of client_error_substatus
  2. | `Informational of informational_substatus
  3. | `Redirection of redirection_substatus
  4. | `Server_error of server_error_substatus
  5. | `Success of success_substatus
]
type status_code = [
  1. | `Code of int
  2. | `Status of status
]
type file_source =
  1. | FileSrc of string
  2. | InChanSrc of Pervasives.in_channel
exception Invalid_header of string
exception Invalid_header_name of string
exception Invalid_header_value of string
exception Invalid_HTTP_version of string
exception Invalid_HTTP_method of string
exception Invalid_code of int
exception Malformed_URL of string
exception Malformed_query of string
exception Malformed_query_part of string * string
exception Malformed_request_URI of string
exception Malformed_cookies of string
exception Malformed_request of string
exception Malformed_response of string
exception Param_not_found of string
exception Invalid_status_line of string
exception Header_not_found of string
exception Quit
exception Unauthorized of string
class type message = object ... end
class type request = object ... end
class type response = object ... end
type daemon_spec = {
  1. address : string;
  2. auth : (string * auth_info) option;
  3. callback : request -> Pervasives.out_channel -> unit;
  4. mode : daemon_mode;
  5. port : int;
  6. root_dir : string option;
  7. exn_handler : (exn -> Pervasives.out_channel -> unit) option;
  8. timeout : int option;
  9. auto_close : bool;
}
class type connection = object ... end
class type daemon = object ... end
OCaml

Innovation. Community. Security.