package piaf

  1. Overview
  2. Docs
include module type of struct include H2.Status end
type informational = [
  1. | `Continue
  2. | `Switching_protocols
]
type successful = [
  1. | `Accepted
  2. | `Created
  3. | `No_content
  4. | `Non_authoritative_information
  5. | `OK
  6. | `Partial_content
  7. | `Reset_content
]
type redirection = [
  1. | `Found
  2. | `Moved_permanently
  3. | `Multiple_choices
  4. | `Not_modified
  5. | `See_other
  6. | `Temporary_redirect
  7. | `Use_proxy
]
type server_error = [
  1. | `Bad_gateway
  2. | `Gateway_timeout
  3. | `Http_version_not_supported
  4. | `Internal_server_error
  5. | `Network_authentication_required
  6. | `Not_implemented
  7. | `Service_unavailable
]
type client_error = [
  1. | `Bad_request
  2. | `Conflict
  3. | `Enhance_your_calm
  4. | `Expectation_failed
  5. | `Forbidden
  6. | `Gone
  7. | `I_m_a_teapot
  8. | `Length_required
  9. | `Method_not_allowed
  10. | `Misdirected_request
  11. | `Not_acceptable
  12. | `Not_found
  13. | `Payload_too_large
  14. | `Payment_required
  15. | `Precondition_failed
  16. | `Precondition_required
  17. | `Proxy_authentication_required
  18. | `Range_not_satisfiable
  19. | `Request_header_fields_too_large
  20. | `Request_timeout
  21. | `Too_many_requests
  22. | `Unauthorized
  23. | `Unsupported_media_type
  24. | `Upgrade_required
  25. | `Uri_too_long
]
type standard = [
  1. | `Accepted
  2. | `Bad_gateway
  3. | `Bad_request
  4. | `Conflict
  5. | `Continue
  6. | `Created
  7. | `Enhance_your_calm
  8. | `Expectation_failed
  9. | `Forbidden
  10. | `Found
  11. | `Gateway_timeout
  12. | `Gone
  13. | `Http_version_not_supported
  14. | `I_m_a_teapot
  15. | `Internal_server_error
  16. | `Length_required
  17. | `Method_not_allowed
  18. | `Misdirected_request
  19. | `Moved_permanently
  20. | `Multiple_choices
  21. | `Network_authentication_required
  22. | `No_content
  23. | `Non_authoritative_information
  24. | `Not_acceptable
  25. | `Not_found
  26. | `Not_implemented
  27. | `Not_modified
  28. | `OK
  29. | `Partial_content
  30. | `Payload_too_large
  31. | `Payment_required
  32. | `Precondition_failed
  33. | `Precondition_required
  34. | `Proxy_authentication_required
  35. | `Range_not_satisfiable
  36. | `Request_header_fields_too_large
  37. | `Request_timeout
  38. | `Reset_content
  39. | `See_other
  40. | `Service_unavailable
  41. | `Switching_protocols
  42. | `Temporary_redirect
  43. | `Too_many_requests
  44. | `Unauthorized
  45. | `Unsupported_media_type
  46. | `Upgrade_required
  47. | `Uri_too_long
  48. | `Use_proxy
]
type t = [
  1. | `Accepted
  2. | `Bad_gateway
  3. | `Bad_request
  4. | `Code of int
  5. | `Conflict
  6. | `Continue
  7. | `Created
  8. | `Enhance_your_calm
  9. | `Expectation_failed
  10. | `Forbidden
  11. | `Found
  12. | `Gateway_timeout
  13. | `Gone
  14. | `Http_version_not_supported
  15. | `I_m_a_teapot
  16. | `Internal_server_error
  17. | `Length_required
  18. | `Method_not_allowed
  19. | `Misdirected_request
  20. | `Moved_permanently
  21. | `Multiple_choices
  22. | `Network_authentication_required
  23. | `No_content
  24. | `Non_authoritative_information
  25. | `Not_acceptable
  26. | `Not_found
  27. | `Not_implemented
  28. | `Not_modified
  29. | `OK
  30. | `Partial_content
  31. | `Payload_too_large
  32. | `Payment_required
  33. | `Precondition_failed
  34. | `Precondition_required
  35. | `Proxy_authentication_required
  36. | `Range_not_satisfiable
  37. | `Request_header_fields_too_large
  38. | `Request_timeout
  39. | `Reset_content
  40. | `See_other
  41. | `Service_unavailable
  42. | `Switching_protocols
  43. | `Temporary_redirect
  44. | `Too_many_requests
  45. | `Unauthorized
  46. | `Unsupported_media_type
  47. | `Upgrade_required
  48. | `Uri_too_long
  49. | `Use_proxy
]
val default_reason_phrase : standard -> string
val to_code : t -> int
val of_code : int -> t
val unsafe_of_code : int -> t
val is_informational : t -> bool
val is_successful : t -> bool
val is_redirection : t -> bool
val is_client_error : t -> bool
val is_server_error : t -> bool
val is_error : t -> bool
val to_string : t -> string
val of_string : string -> t
val pp_hum : Stdlib.Format.formatter -> t -> unit
val is_permanent_redirection : [> `Code of int | `Moved_permanently ] -> bool
OCaml

Innovation. Community. Security.