package cohttp

  1. Overview
  2. Docs
type version = [
  1. | `HTTP_1_0
  2. | `HTTP_1_1
]
type meth = [
  1. | `DELETE
  2. | `GET
  3. | `HEAD
  4. | `PATCH
  5. | `POST
]
type informational_status = [
  1. | `Continue
  2. | `Switching_protocols
]
type success_status = [
  1. | `Accepted
  2. | `Created
  3. | `No_content
  4. | `Non_authoritative_information
  5. | `OK
  6. | `Partial_content
  7. | `Reset_content
]
type redirection_status = [
  1. | `Found
  2. | `Moved_permanently
  3. | `Multiple_choices
  4. | `Not_modified
  5. | `See_other
  6. | `Temporary_redirect
  7. | `Use_proxy
]
type client_error_status = [
  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_status = [
  1. | `Bad_gateway
  2. | `Gateway_time_out
  3. | `HTTP_version_not_supported
  4. | `Internal_server_error
  5. | `Not_implemented
  6. | `Service_unavailable
]
type error_status = [
  1. | `Bad_gateway
  2. | `Bad_request
  3. | `Conflict
  4. | `Expectation_failed
  5. | `Forbidden
  6. | `Gateway_time_out
  7. | `Gone
  8. | `HTTP_version_not_supported
  9. | `Internal_server_error
  10. | `Length_required
  11. | `Method_not_allowed
  12. | `Not_acceptable
  13. | `Not_found
  14. | `Not_implemented
  15. | `Payment_required
  16. | `Precondition_failed
  17. | `Proxy_authentication_required
  18. | `Request_URI_too_large
  19. | `Request_entity_too_large
  20. | `Request_time_out
  21. | `Requested_range_not_satisfiable
  22. | `Service_unavailable
  23. | `Unauthorized
  24. | `Unsupported_media_type
]
type status = [
  1. | `Accepted
  2. | `Bad_gateway
  3. | `Bad_request
  4. | `Conflict
  5. | `Continue
  6. | `Created
  7. | `Expectation_failed
  8. | `Forbidden
  9. | `Found
  10. | `Gateway_time_out
  11. | `Gone
  12. | `HTTP_version_not_supported
  13. | `Internal_server_error
  14. | `Length_required
  15. | `Method_not_allowed
  16. | `Moved_permanently
  17. | `Multiple_choices
  18. | `No_content
  19. | `Non_authoritative_information
  20. | `Not_acceptable
  21. | `Not_found
  22. | `Not_implemented
  23. | `Not_modified
  24. | `OK
  25. | `Partial_content
  26. | `Payment_required
  27. | `Precondition_failed
  28. | `Proxy_authentication_required
  29. | `Request_URI_too_large
  30. | `Request_entity_too_large
  31. | `Request_time_out
  32. | `Requested_range_not_satisfiable
  33. | `Reset_content
  34. | `See_other
  35. | `Service_unavailable
  36. | `Switching_protocols
  37. | `Temporary_redirect
  38. | `Unauthorized
  39. | `Unsupported_media_type
  40. | `Use_proxy
]
type status_code = [
  1. | `Accepted
  2. | `Bad_gateway
  3. | `Bad_request
  4. | `Code of int
  5. | `Conflict
  6. | `Continue
  7. | `Created
  8. | `Expectation_failed
  9. | `Forbidden
  10. | `Found
  11. | `Gateway_time_out
  12. | `Gone
  13. | `HTTP_version_not_supported
  14. | `Internal_server_error
  15. | `Length_required
  16. | `Method_not_allowed
  17. | `Moved_permanently
  18. | `Multiple_choices
  19. | `No_content
  20. | `Non_authoritative_information
  21. | `Not_acceptable
  22. | `Not_found
  23. | `Not_implemented
  24. | `Not_modified
  25. | `OK
  26. | `Partial_content
  27. | `Payment_required
  28. | `Precondition_failed
  29. | `Proxy_authentication_required
  30. | `Request_URI_too_large
  31. | `Request_entity_too_large
  32. | `Request_time_out
  33. | `Requested_range_not_satisfiable
  34. | `Reset_content
  35. | `See_other
  36. | `Service_unavailable
  37. | `Switching_protocols
  38. | `Temporary_redirect
  39. | `Unauthorized
  40. | `Unsupported_media_type
  41. | `Use_proxy
]
val string_of_version : version -> string
val version_of_string : string -> version option
val string_of_method : meth -> string
val method_of_string : string -> meth option
val status_of_code : int -> status_code
val code_of_status : status_code -> int
val string_of_status : status_code -> string
val reason_phrase_of_code : int -> string
val is_informational : int -> bool
val is_success : int -> bool
val is_redirection : int -> bool
val is_client_error : int -> bool
val is_server_error : int -> bool
val is_error : int -> bool
OCaml

Innovation. Community. Security.