package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Httpaf = Dream_httpaf_.Httpaf
include module type of Httpaf.Status with type client_error := Httpaf.Status.client_error and type standard := Httpaf.Status.standard and type t := Httpaf.Status.t

Response Status Codes

The status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request.

See RFC7231§6 for more details.

Response Status Codes

The status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request.

See RFC7231§6 for more details.

type informational = [
  1. | `Continue
  2. | `Switching_protocols
]

The 1xx (Informational) class of status code indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.

See RFC7231§6.2 for more details.

type successful = [
  1. | `OK
  2. | `Created
  3. | `Accepted
  4. | `Non_authoritative_information
  5. | `No_content
  6. | `Reset_content
  7. | `Partial_content
]

The 2xx (Successful) class of status code indicates that the client's request was successfully received, understood, and accepted.

See RFC7231§6.3 for more details.

type redirection = [
  1. | `Multiple_choices
  2. | `Moved_permanently
  3. | `Found
  4. | `See_other
  5. | `Not_modified
  6. | `Use_proxy
  7. | `Temporary_redirect
]

The 3xx (Redirection) class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request.

See RFC7231§6.4 for more details.

type server_error = [
  1. | `Internal_server_error
  2. | `Not_implemented
  3. | `Bad_gateway
  4. | `Service_unavailable
  5. | `Gateway_timeout
  6. | `Http_version_not_supported
  7. | `Network_authentication_required
]

The 5xx (Server Error) class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method.

See RFC7231§6.6 for more details.

type client_error = [
  1. | Httpaf.Status.client_error
  2. | `Misdirected_request
]
type standard = [
  1. | Httpaf.Status.standard
  2. | client_error
]
type t = [
  1. | standard
  2. | `Code of int
]
val default_reason_phrase : [< `Accepted | `Bad_gateway | `Bad_request | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> string
val to_code : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> int
val unsafe_of_code : int -> t
val of_code : int -> t
val is_informational : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> bool
val is_successful : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> bool
val is_redirection : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> bool
val is_client_error : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> bool
val is_server_error : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> bool
val is_error : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> bool
val to_string : [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> string
val of_string : string -> t
val pp_hum : Format.formatter -> [< `Accepted | `Bad_gateway | `Bad_request | `Code of int | `Conflict | `Continue | `Created | `Enhance_your_calm | `Expectation_failed | `Forbidden | `Found | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Misdirected_request | `Moved_permanently | `Multiple_choices | `Network_authentication_required | `No_content | `Non_authoritative_information | `Not_acceptable | `Not_found | `Not_implemented | `Not_modified | `OK | `Partial_content | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Reset_content | `See_other | `Service_unavailable | `Switching_protocols | `Temporary_redirect | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long | `Use_proxy ] -> unit
OCaml

Innovation. Community. Security.