Add Go status constants

This commit is contained in:
Igor Dubinskiy 2016-01-27 14:08:33 -08:00
parent 6d47d28d5e
commit a60929f987
41 changed files with 80 additions and 39 deletions

View File

@ -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

View File

@ -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

View File

@ -4,6 +4,7 @@ code: 200
title: OK
references:
"Rails HTTP Status Symbol": ":ok"
"Go HTTP Status Constant": "http.StatusOK"
---
The request has succeeded.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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?
---

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -4,6 +4,7 @@ code: 411
title: Length Required
references:
"Rails HTTP Status Symbol": ":length_required"
"Go HTTP Status Constant": "http.StatusLengthRequired"
---
The server refuses to accept the request without a defined

View File

@ -4,6 +4,7 @@ code: 412
title: Precondition Failed
references:
"Rails HTTP Status Symbol": ":precondition_failed"
"Go HTTP Status Constant": "http.StatusPreconditionFailed"
---
One or more conditions given in the request header fields evaluated to false

View File

@ -4,6 +4,7 @@ code: 413
title: Payload Too Large
references:
"Rails HTTP Status Symbol": ":request_entity_too_large"
"Go HTTP Status Constant": "http.StatusRequestEntityTooLarge"
---
The server is refusing to process a request because the request payload is

View File

@ -4,6 +4,7 @@ code: 414
title: Request-URI Too Long
references:
"Rails HTTP Status Symbol": ":request_uri_too_long"
"Go HTTP Status Constant": "http.StatusRequestURITooLong"
---
The server is refusing to service the request because the

View File

@ -4,6 +4,7 @@ code: 415
title: Unsupported Media Type
references:
"Rails HTTP Status Symbol": ":unsupported_media_type"
"Go HTTP Status Constant": "http.StatusUnsupportedMediaType"
---
The origin server is refusing to service the request because the payload is in a

View File

@ -4,6 +4,7 @@ code: 416
title: Requested Range Not Satisfiable
references:
"Rails HTTP Status Symbol": ":requested_range_not_satisfiable"
"Go HTTP Status Constant": "http.StatusRequestedRangeNotSatisfiable"
---
None of the ranges in the request's Range header field<sup>[1](#ref-1)</sup>

View File

@ -4,6 +4,7 @@ code: 417
title: Expectation Failed
references:
"Rails HTTP Status Symbol": ":expectation_failed"
"Go HTTP Status Constant": "http.StatusExpectationFailed"
---
The expectation given in the request's Expect header field<sup>[1](#ref-1)</sup>

View File

@ -4,6 +4,7 @@ code: 418
title: I'm a teapot
references:
"Rails HTTP Status Symbol": ":i'm_a_teapot"
"Go HTTP Status Constant": "http.StatusTeapot"
---
Any attempt to brew coffee with a teapot should result in the error code

View File

@ -4,6 +4,7 @@ code: 500
title: Internal Server Error
references:
"Rails HTTP Status Symbol": ":internal_server_error"
"Go HTTP Status Constant": "http.StatusInternalServerError"
---
The server encountered an unexpected condition that prevented it from fulfilling

View File

@ -4,6 +4,7 @@ code: 501
title: Not Implemented
references:
"Rails HTTP Status Symbol": ":not_implemented"
"Go HTTP Status Constant": "http.StatusNotImplemented"
---
The server does not support the functionality required to fulfill the request.

View File

@ -4,6 +4,7 @@ code: 502
title: Bad Gateway
references:
"Rails HTTP Status Symbol": ":bad_gateway"
"Go HTTP Status Constant": "http.StatusBadGateway"
---
The server, while acting as a gateway or proxy, received an invalid response

View File

@ -4,6 +4,7 @@ code: 503
title: Service Unavailable
references:
"Rails HTTP Status Symbol": ":service_unavailable"
"Go HTTP Status Constant": "http.StatusServiceUnavailable"
---
The server is currently unable to handle the request due to a temporary overload

View File

@ -4,6 +4,7 @@ code: 504
title: Gateway Timeout
references:
"Rails HTTP Status Symbol": ":gateway_timeout"
"Go HTTP Status Constant": "http.StatusGatewayTimeout"
---
The server, while acting as a gateway or proxy, did not receive a timely

View File

@ -4,6 +4,7 @@ code: 505
title: HTTP Version Not Supported
references:
"Rails HTTP Status Symbol": ":http_version_not_supported"
"Go HTTP Status Constant": "http.StatusHTTPVersionNotSupported"
---
The server does not support, or refuses to support, the major version of HTTP