Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Adding links to references #95

Merged
merged 1 commit into from
Dec 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 55 additions & 8 deletions lib/net/http/responses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,13 @@ class HTTPIMUsed < HTTPSuccess
#
# The <tt>Multiple Choices</tt> response indicates that the server
# offers multiple options for the resource from which the client may choose.
# See {300 Multiple Choices}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
#
class HTTPMultipleChoices < HTTPRedirection
HAS_BODY = true
end
Expand All @@ -305,7 +311,13 @@ class HTTPMultipleChoices < HTTPRedirection
#
# The <tt>Moved Permanently</tt> response indicates that links or records
# returning this response should be updated to use the given URL.
# See {301 Moved Permanently}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
#
class HTTPMovedPermanently < HTTPRedirection
HAS_BODY = true
end
Expand All @@ -314,7 +326,13 @@ class HTTPMovedPermanently < HTTPRedirection
#
# The <tt>Found</tt> response indicates that the client
# should look at (browse to) another URL.
# See {302 Found}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
#
class HTTPFound < HTTPRedirection
HAS_BODY = true
end
Expand All @@ -323,7 +341,13 @@ class HTTPFound < HTTPRedirection
# Response class for <tt>See Other</tt> responses (status code 303).
#
# The response to the request can be found under another URI using the GET method.
# See {303 See Other}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
#
class HTTPSeeOther < HTTPRedirection
HAS_BODY = true
end
Expand All @@ -332,7 +356,13 @@ class HTTPSeeOther < HTTPRedirection
#
# Indicates that the resource has not been modified since the version
# specified by the request headers.
# See {304 Not Modified}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
#
class HTTPNotModified < HTTPRedirection
HAS_BODY = false
end
Expand All @@ -341,7 +371,12 @@ class HTTPNotModified < HTTPRedirection
#
# The requested resource is available only through a proxy,
# whose address is provided in the response.
# See {305 Use Proxy}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
#
# References:
#
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
#
class HTTPUseProxy < HTTPRedirection
HAS_BODY = false
end
Expand All @@ -350,15 +385,27 @@ class HTTPUseProxy < HTTPRedirection
#
# The request should be repeated with another URI;
# however, future requests should still use the original URI.
# See {307 Temporary Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
#
class HTTPTemporaryRedirect < HTTPRedirection
HAS_BODY = true
end

# Response class for <tt>Permanent Redirect</tt> responses (status code 308).
#
# This and all future requests should be directed to the given URI.
# See {308 Permanent Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
#
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-308-permanent-redirect].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
#
class HTTPPermanentRedirect < HTTPRedirection
HAS_BODY = true
end
Expand Down