Skip to content

Commit

Permalink
Add Go status constants
Browse files Browse the repository at this point in the history
  • Loading branch information
idubinskiy committed Jan 27, 2016
1 parent 6d47d28 commit a60929f
Show file tree
Hide file tree
Showing 41 changed files with 80 additions and 39 deletions.
3 changes: 2 additions & 1 deletion contents/codes/100.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 100
title: Continue
references:
"Rails HTTP Status Symbol": ":continue"
"Go HTTP Status Constant": "http.StatusContinue"
---

The initial part of a request has been received and has not yet been rejected by
Expand All @@ -24,4 +25,4 @@ If the request did not contain an Expect header field containing the
* Source: [RFC7231 Section 6.1.1][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.2.1>
[2]: <http://tools.ietf.org/html/rfc7231#section-5.1.1>
[2]: <http://tools.ietf.org/html/rfc7231#section-5.1.1>
3 changes: 2 additions & 1 deletion contents/codes/101.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 101
title: Switching Protocols
references:
"Rails HTTP Status Symbol": ":switching_protocols"
"Go HTTP Status Constant": "http.StatusSwitchingProtocols"
---

The server understands and is willing to comply with the client's request, via
Expand All @@ -25,4 +26,4 @@ protocol might be advantageous when delivering resources that use such features.
* Source: [RFC7231 Section 6.2.2][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.2.2>
[2]: <http://tools.ietf.org/html/rfc7230#section-6.7>
[2]: <http://tools.ietf.org/html/rfc7230#section-6.7>
3 changes: 2 additions & 1 deletion contents/codes/200.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 200
title: OK
references:
"Rails HTTP Status Symbol": ":ok"
"Go HTTP Status Constant": "http.StatusOK"
---

The request has succeeded.
Expand Down Expand Up @@ -35,4 +36,4 @@ method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
* Source: [RFC7231 Section 6.3.1][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.1>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
3 changes: 2 additions & 1 deletion contents/codes/201.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 201
title: Created
references:
"Rails HTTP Status Symbol": ":created"
"Go HTTP Status Constant": "http.StatusCreated"
---

The request has been fulfilled and has resulted in one or more new resources
Expand All @@ -23,4 +24,4 @@ response.
* Source: [RFC7231 Section 6.3.2][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.2>
[2]: <http://tools.ietf.org/html/rfc7231#section-7.2
[2]: <http://tools.ietf.org/html/rfc7231#section-7.2
3 changes: 2 additions & 1 deletion contents/codes/202.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 202
title: Accepted
references:
"Rails HTTP Status Symbol": ":accepted"
"Go HTTP Status Constant": "http.StatusAccepted"
---

The request has been accepted for processing, but the processing has not been
Expand All @@ -25,4 +26,4 @@ an estimate of when the request will be fulfilled.

* Source: [RFC7231 Section 6.3.3][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.3>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.3>
1 change: 1 addition & 0 deletions contents/codes/203.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 203
title: Non-authoritative Information
references:
"Rails HTTP Status Symbol": ":non_authoritative_information"
"Go HTTP Status Constant": "http.StatusNonAuthoritativeInfo"
---

The request was successful but the enclosed payload has been modified from that
Expand Down
3 changes: 2 additions & 1 deletion contents/codes/204.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 204
title: No Content
references:
"Rails HTTP Status Symbol": ":no_content"
"Go HTTP Status Constant": "http.StatusNoContent"
---

The server has successfully fulfilled the request and that there is no
Expand Down Expand Up @@ -43,4 +44,4 @@ method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
* Source: [RFC7231 Section 6.3.5][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.5>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
3 changes: 2 additions & 1 deletion contents/codes/205.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 205
title: Reset Content
references:
"Rails HTTP Status Symbol": ":reset_content"
"Go HTTP Status Constant": "http.StatusResetContent"
---

The server has fulfilled the request and desires that the user agent reset the
Expand All @@ -29,4 +30,4 @@ immediately after sending the blank line terminating the header section.

* Source: [RFC7231 Section 6.3.6][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.6>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.3.6>
1 change: 1 addition & 0 deletions contents/codes/206.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 206
title: Partial Content
references:
"Rails HTTP Status Symbol": ":partial_content"
"Go HTTP Status Constant": "http.StatusPartialContent"
---

The server is successfully fulfilling a range request for the target resource by
Expand Down
3 changes: 2 additions & 1 deletion contents/codes/300.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 300
title: Multiple Choices
references:
"Rails HTTP Status Symbol": ":multiple_choices"
"Go HTTP Status Constant": "http.StatusMultipleChoices"
---

The target resource has more than one representation, each with its own more
Expand Down Expand Up @@ -53,4 +54,4 @@ though deployment is a chicken-and-egg problem.
[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.1>
[2]: <http://tools.ietf.org/html/rfc7231#section-3.4>
[3]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[4]: <http://tools.ietf.org/html/rfc5988>
[4]: <http://tools.ietf.org/html/rfc5988>
3 changes: 2 additions & 1 deletion contents/codes/301.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 301
title: Moved Permanently
references:
"Rails HTTP Status Symbol": ":moved_permanently"
"Go HTTP Status Constant": "http.StatusMovedPermanently"
---

The target resource has been assigned a new permanent URI and any future
Expand Down Expand Up @@ -32,4 +33,4 @@ method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
* Source: [RFC7231 Section 6.4.2][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
3 changes: 2 additions & 1 deletion contents/codes/302.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 302
title: Found
references:
"Rails HTTP Status Symbol": ":found"
"Go HTTP Status Constant": "http.StatusFound"
---

The target resource resides temporarily under a different URI. Since the
Expand All @@ -23,4 +24,4 @@ POST to GET for the subsequent request. If this behavior is undesired, the

* Source: [RFC7231 Section 6.4.3][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.3>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.3>
3 changes: 2 additions & 1 deletion contents/codes/303.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 303
title: See Other
references:
"Rails HTTP Status Symbol": ":see_other"
"Go HTTP Status Constant": "http.StatusSeeOther"
---

The server is redirecting the user agent to a different resource, as indicated
Expand Down Expand Up @@ -39,4 +40,4 @@ reference provided in the Location header field.

* Source: [RFC7321 Section 6.4.4][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.4>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.4>
3 changes: 2 additions & 1 deletion contents/codes/304.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 304
title: Not Modified
references:
"Rails HTTP Status Symbol": ":not_modified"
"Go HTTP Status Constant": "http.StatusNotModified"
---

A conditional GET or HEAD request has been received and would have resulted in a
Expand Down Expand Up @@ -40,4 +41,4 @@ first empty line after the header fields.
* Source: [RFC7232 Section 4.1][1]

[1]: <http://tools.ietf.org/html/rfc7232#section-4.1>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.3.4>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.3.4>
3 changes: 2 additions & 1 deletion contents/codes/305.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 305
title: Use Proxy
#references:
# "Rails HTTP Status Symbol": "use_proxy"
# "Go HTTP Status Constant": "http.StatusUseProxy"
# - Due to deprecation we won't show this... but should we?
---

Expand All @@ -14,4 +15,4 @@ to security concerns regarding in-band configuration of a proxy.

* Source: [RFC7231 Section 6.4.5][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.5>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.5>
3 changes: 2 additions & 1 deletion contents/codes/307.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 307
title: Temporary Redirect
references:
"Rails HTTP Status Symbol": ":temporary_redirect"
"Go HTTP Status Constant": "http.StatusTemporaryRedirect"
---

The target resource resides temporarily under a different URI and the user agent
Expand All @@ -28,4 +29,4 @@ proposes defining the status code [308 Permanent Redirect](/308) for this purpos
* Source: [RFC7231 Section 6.4.7][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.7>
[2]: <http://tools.ietf.org/html/rfc7238>
[2]: <http://tools.ietf.org/html/rfc7238>
3 changes: 2 additions & 1 deletion contents/codes/400.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 400
title: Bad Request
references:
"Rails HTTP Status Symbol": "bad_request"
"Go HTTP Status Constant": "http.StatusBadRequest"
---

The server cannot or will not process the request due to something that is
Expand All @@ -14,4 +15,4 @@ message framing, or deceptive request routing).

* Source: [RFC7231 Section 6.5.1][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.1>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.1>
3 changes: 2 additions & 1 deletion contents/codes/401.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 401
title: Unauthorized
references:
"Rails HTTP Status Symbol": ":unauthorized"
"Go HTTP Status Constant": "http.StatusUnauthorized"
---

The request has not been applied because it lacks valid authentication
Expand All @@ -29,4 +30,4 @@ the user, since it usually contains relevant diagnostic information.

[1]: <http://tools.ietf.org/html/rfc7235#section-3.1>
[2]: <http://tools.ietf.org/html/rfc7235#section-4.1>
[3]: <http://tools.ietf.org/html/rfc7235#section-4.2>
[3]: <http://tools.ietf.org/html/rfc7235#section-4.2>
3 changes: 2 additions & 1 deletion contents/codes/402.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 402
title: Payment Required
references:
"Rails HTTP Status Symbol": ":payment_required"
"Go HTTP Status Constant": "http.StatusPaymentRequired"
---

Reserved for future use.
Expand All @@ -12,4 +13,4 @@ Reserved for future use.

* Source: [RFC7231 Section 6.5.2][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.2>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.2>
3 changes: 2 additions & 1 deletion contents/codes/403.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 403
title: Forbidden
references:
"Rails HTTP Status Symbol": ":forbidden"
"Go HTTP Status Constant": "http.StatusForbidden"
---

The server understood the request but refuses to authorize it.
Expand All @@ -25,4 +26,4 @@ target resource MAY instead respond with a status code of

* Source: [RFC7231 Section 6.5.3][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.3>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.3>
3 changes: 2 additions & 1 deletion contents/codes/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 404
title: Not Found
references:
"Rails HTTP Status Symbol": ":not_found"
"Go HTTP Status Constant": "http.StatusNotFound"
---

The origin server did not find a current representation for the target resource
Expand All @@ -24,4 +25,4 @@ method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
* Source: [RFC7231 6.5.4][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.4>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
3 changes: 2 additions & 1 deletion contents/codes/405.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 405
title: Method Not Allowed
references:
"Rails HTTP Status Symbol": ":method_not_allowed"
"Go HTTP Status Constant": "http.StatusMethodNotAllowed"
---

The method received in the request-line is known by the origin server but not
Expand All @@ -22,4 +23,4 @@ method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
* Source: [RFC7231 Section 6.5.5][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.5>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
3 changes: 2 additions & 1 deletion contents/codes/406.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 406
title: Not Acceptable
references:
"Rails HTTP Status Symbol": ":not_acceptable"
"Go HTTP Status Constant": "http.StatusNotAcceptable"
---

The target resource does not have a current representation that would be
Expand All @@ -26,4 +27,4 @@ described in [RFC7231 Section 6.4.1][3].

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.6>
[2]: <http://tools.ietf.org/html/rfc7231#section-5.3>
[3]: <http://tools.ietf.org/html/rfc7231#section-6.4.1>
[3]: <http://tools.ietf.org/html/rfc7231#section-6.4.1>
3 changes: 2 additions & 1 deletion contents/codes/407.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 407
title: Proxy Authentication Required
references:
"Rails HTTP Status Symbol": ":proxy_authentication_required"
"Go HTTP Status Constant": "http.StatusProxyAuthRequired"
---

Similar to [401 Unauthorized](/401), but it indicates that the client needs to
Expand All @@ -24,4 +25,4 @@ header field<sup>[2](#ref-2)</sup>.

[1]: <http://tools.ietf.org/html/rfc7235#section-3.2>
[2]: <http://tools.ietf.org/html/rfc7235#section-4.3>
[3]: <http://tools.ietf.org/html/rfc7235#section-4.4>
[3]: <http://tools.ietf.org/html/rfc7235#section-4.4>
3 changes: 2 additions & 1 deletion contents/codes/408.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 408
title: Request Timeout
references:
"Rails HTTP Status Symbol": ":request_timeout"
"Go HTTP Status Constant": "http.StatusRequestTimeout"
---

The server did not receive a complete request message within the time that it
Expand All @@ -20,4 +21,4 @@ request in transit, the client MAY repeat that request on a new connection.
* Source: [RFC7231 Section 6.5.7][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.7>
[2]: <http://tools.ietf.org/html/rfc7230#section-6.1>
[2]: <http://tools.ietf.org/html/rfc7230#section-6.1>
3 changes: 2 additions & 1 deletion contents/codes/409.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 409
title: Conflict
references:
"Rails HTTP Status Symbol": ":conflict"
"Go HTTP Status Constant": "http.StatusConflict"
---

The request could not be completed due to a conflict with the current state of
Expand All @@ -24,4 +25,4 @@ information useful for merging the differences based on the revision history.

* Source: [RFC7231 Section 6.5.8][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.8>
[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.8>
3 changes: 2 additions & 1 deletion contents/codes/410.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ code: 410
title: Gone
references:
"Rails HTTP Status Symbol": ":gone"
"Go HTTP Status Constant": "http.StatusGone"
---

The target resource is no longer available at the origin server and that this
Expand Down Expand Up @@ -32,4 +33,4 @@ method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
* Source: [RFC7231 Section 6.5.9][1]

[1]: <http://tools.ietf.org/html/rfc7231#section-6.5.9>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
Loading

0 comments on commit a60929f

Please sign in to comment.