package sonet

  1. Overview
  2. Docs
type status =
  1. | Status_continue
  2. | Status_switching_protocols
  3. | Status_ok
  4. | Status_created
  5. | Status_accepted
  6. | Status_non_authoritative
  7. | Status_no_content
  8. | Status_reset_content
  9. | Status_partial_content
  10. | Status_multiple_choices
  11. | Status_moved_permanently
  12. | Status_found
  13. | Status_see_other
  14. | Status_not_modified
  15. | Status_use_proxy
  16. | Status_temporary_redirect
  17. | Status_bad_request
  18. | Status_unauthorized
  19. | Status_payment_required
  20. | Status_forbidden
  21. | Status_not_found
  22. | Status_method_not_allowed
  23. | Status_not_acceptable
  24. | Status_proxy_authentication_required
  25. | Status_request_timeout
  26. | Status_conflict
  27. | Status_gone
  28. | Status_length_required
  29. | Status_precondition_failed
  30. | Status_request_entity_too_large
  31. | Status_request_uri_too_large
  32. | Status_unsupported_media_type
  33. | Status_requested_range_not_satisfiable
  34. | Status_expectation_failed
  35. | Status_internal_server_error
  36. | Status_not_implemented
  37. | Status_bad_gateway
  38. | Status_service_unavailable
  39. | Status_gateway_timeout
  40. | Status_version_not_supported
  41. | Status_other of int * string
val status_info : status -> int * string
type state
val init_state : unit -> state
val num_bytes_parsed : state -> int
type t = {
  1. version : version;
  2. status_code : int;
  3. reason_phrase : string;
  4. headers : header_fields;
}
type parse_result =
  1. | Result of t * int
  2. | Parse_incomplete of state
val parse : state -> string -> parse_result
val parse_substring : state -> string -> int -> int -> parse_result
type error
exception Http_error of error
val string_of_error : error -> string
val serialize : Buffer.t -> t -> unit
OCaml

Innovation. Community. Security.