View Source Orbit.Status (Orbit v0.2.0)

The canonical list of response status codes.

This module contains helper functions for applying any status code to an Orbit.Request.

When set manually, status codes may be specified by integer or atom. They can be coerced one way or the other with to_atom/1 and to_integer/1.

StatusName
10:input
11:sensitive_input
20:success
30:redirect_temporary
31:redirect_permanent
40:temporary_failure
41:server_unavailable
42:cgi_error
43:proxy_error
44:slow_down
50:permanent_failure
51:not_found
52:gone
53:proxy_request_refused
59:bad_request
60:client_certificate_required
61:certificate_not_authorized
62:certificate_not_valid

Link to this section Summary

Functions

Responds with the :bad_request (59) status.

Responds with the :certificate_not_authorized (61) status.

Responds with the :certificate_not_valid (62) status.

Responds with the :cgi_error (42) status.

Responds with the :client_certificate_required (60) status.

Responds with the :gone (52) status.

Responds with the :input (10) status.

Responds with the :not_found (51) status.

Responds with the :permanent_failure (50) status.

Responds with the :proxy_error (43) status.

Responds with the :proxy_request_refused (53) status.

Responds with the :redirect_permanent (31) status.

Responds with the :redirect_temporary (30) status.

Responds with the :sensitive_input (11) status.

Responds with the :server_unavailable (41) status.

Responds with the :slow_down (44) status.

Responds with a success status containing body content.

Responds with the :temporary_failure (40) status.

Normalizes a status code to an atom.

Normalizes a status code to an integer.

Link to this section Types

Link to this section Functions

Link to this function

bad_request(req, meta \\ nil)

View Source

Responds with the :bad_request (59) status.

Link to this function

certificate_not_authorized(req, meta \\ nil)

View Source

Responds with the :certificate_not_authorized (61) status.

Link to this function

certificate_not_valid(req, meta \\ nil)

View Source

Responds with the :certificate_not_valid (62) status.

Link to this function

cgi_error(req, meta \\ nil)

View Source

Responds with the :cgi_error (42) status.

Link to this function

client_certificate_required(req, meta \\ nil)

View Source

Responds with the :client_certificate_required (60) status.

Responds with the :gone (52) status.

Responds with the :input (10) status.

Link to this function

not_found(req, meta \\ nil)

View Source

Responds with the :not_found (51) status.

Link to this function

permanent_failure(req, meta \\ nil)

View Source

Responds with the :permanent_failure (50) status.

Link to this function

proxy_error(req, meta \\ nil)

View Source

Responds with the :proxy_error (43) status.

Link to this function

proxy_request_refused(req, meta \\ nil)

View Source

Responds with the :proxy_request_refused (53) status.

Link to this function

redirect_permanent(req, meta \\ nil)

View Source

Responds with the :redirect_permanent (31) status.

Link to this function

redirect_temporary(req, meta \\ nil)

View Source

Responds with the :redirect_temporary (30) status.

Link to this function

sensitive_input(req, meta \\ nil)

View Source

Responds with the :sensitive_input (11) status.

Link to this function

server_unavailable(req, meta \\ nil)

View Source

Responds with the :server_unavailable (41) status.

Link to this function

slow_down(req, meta \\ nil)

View Source

Responds with the :slow_down (44) status.

Link to this function

success(req, body, mime_type \\ nil)

View Source

Responds with a success status containing body content.

Link to this function

temporary_failure(req, meta \\ nil)

View Source

Responds with the :temporary_failure (40) status.

Normalizes a status code to an atom.

Normalizes a status code to an integer.