From df5a554fa824c2a4601c890410182d6558574b9e Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Mon, 19 Dec 2022 17:38:02 +0000 Subject: [PATCH 1/2] Adding links to references --- lib/net/http/responses.rb | 75 +++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb index b2dad105..17aaca8c 100644 --- a/lib/net/http/responses.rb +++ b/lib/net/http/responses.rb @@ -142,7 +142,13 @@ class HTTPEarlyHints < HTTPInformation # # The +OK+ response indicates that the server has received # a request and has responded successfully. - # See {200 OK}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200]. + # class HTTPOK < HTTPSuccess HAS_BODY = true end @@ -151,7 +157,13 @@ class HTTPOK < HTTPSuccess # # The +Created+ response indicates that the server has received # and has fulfilled a request to create a new resource. - # See {201 Created}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-201-created]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201]. + # class HTTPCreated < HTTPSuccess HAS_BODY = true end @@ -160,7 +172,13 @@ class HTTPCreated < HTTPSuccess # # The +Accepted+ response indicates that the server has received # and is processing a request, but the processing has not yet been completed. - # See {202 Accepted}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-202-accepted]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202]. + # class HTTPAccepted < HTTPSuccess HAS_BODY = true end @@ -171,7 +189,13 @@ class HTTPAccepted < HTTPSuccess # is a transforming proxy (such as a Web accelerator) # that received a 200 OK response from its origin, # and is returning a modified version of the origin's response. - # See {203 Non-Authoritative Information}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/203]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-203-non-authoritative-infor]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203]. + # class HTTPNonAuthoritativeInformation < HTTPSuccess HAS_BODY = true end @@ -180,7 +204,13 @@ class HTTPNonAuthoritativeInformation < HTTPSuccess # # The No Content response indicates that the server # successfully processed the request, and is not returning any content. - # See {204 No Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-204-no-content]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204]. + # class HTTPNoContent < HTTPSuccess HAS_BODY = false end @@ -190,7 +220,13 @@ class HTTPNoContent < HTTPSuccess # The Reset Content response indicates that the server # successfully processed the request, # asks that the client reset its document view, and is not returning any content. - # See {205 Reset Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/205]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205]. + # class HTTPResetContent < HTTPSuccess HAS_BODY = false end @@ -200,7 +236,13 @@ class HTTPResetContent < HTTPSuccess # The Partial Content response indicates that the server is delivering # only part of the resource (byte serving) # due to a Range header in the request. - # See {206 Partial Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206]. + # + # References: + # + # - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206]. + # - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-206-partial-content]. + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206]. + # class HTTPPartialContent < HTTPSuccess HAS_BODY = true end @@ -210,7 +252,11 @@ class HTTPPartialContent < HTTPSuccess # The Multi-Status (WebDAV) response indicates that the server # has received the request, # and that the message body can contain a number of separate response codes. - # See {207 Multi-Status (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207]. + # + # References: + # + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207]. + # class HTTPMultiStatus < HTTPSuccess HAS_BODY = true end @@ -222,7 +268,11 @@ class HTTPMultiStatus < HTTPSuccess # and that the members of a DAV binding have already been enumerated # in a preceding part of the (multi-status) response, # and are not being included again. - # See {208 Already Reported (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208]. + # + # References: + # + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208]. + # class HTTPAlreadyReported < HTTPSuccess HAS_BODY = true end @@ -231,8 +281,11 @@ class HTTPAlreadyReported < HTTPSuccess # # The IM Used response indicates that the server has fulfilled a request # for the resource, and the response is a representation of the result - # of one or more instance-manipulations applied to the current instance. - # See {226 IM Used}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226]. + # + # References: + # + # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226]. + # class HTTPIMUsed < HTTPSuccess HAS_BODY = true end From e4df80f2991cc84757d8b1e439648b422acfbc46 Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Tue, 20 Dec 2022 16:52:26 +0000 Subject: [PATCH 2/2] Adding links to references --- lib/net/http/responses.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb index 17aaca8c..bb6bddb0 100644 --- a/lib/net/http/responses.rb +++ b/lib/net/http/responses.rb @@ -281,6 +281,7 @@ class HTTPAlreadyReported < HTTPSuccess # # The IM Used response indicates that the server has fulfilled a request # for the resource, and the response is a representation of the result + # of one or more instance-manipulations applied to the current instance. # # References: #