Skip to content

Commit b00f11a

Browse files
authored
Merge pull request #95 from BurdetteLamar/responses_doc
[DOC] Adding links to references
2 parents 502630f + 71bae5c commit b00f11a

File tree

1 file changed

+55
-8
lines changed

1 file changed

+55
-8
lines changed

lib/net/http/responses.rb

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,13 @@ class HTTPIMUsed < HTTPSuccess
295295
#
296296
# The <tt>Multiple Choices</tt> response indicates that the server
297297
# offers multiple options for the resource from which the client may choose.
298-
# See {300 Multiple Choices}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
298+
#
299+
# References:
300+
#
301+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
302+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
303+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
304+
#
299305
class HTTPMultipleChoices < HTTPRedirection
300306
HAS_BODY = true
301307
end
@@ -305,7 +311,13 @@ class HTTPMultipleChoices < HTTPRedirection
305311
#
306312
# The <tt>Moved Permanently</tt> response indicates that links or records
307313
# returning this response should be updated to use the given URL.
308-
# See {301 Moved Permanently}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
314+
#
315+
# References:
316+
#
317+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
318+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
319+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
320+
#
309321
class HTTPMovedPermanently < HTTPRedirection
310322
HAS_BODY = true
311323
end
@@ -314,7 +326,13 @@ class HTTPMovedPermanently < HTTPRedirection
314326
#
315327
# The <tt>Found</tt> response indicates that the client
316328
# should look at (browse to) another URL.
317-
# See {302 Found}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
329+
#
330+
# References:
331+
#
332+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
333+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
334+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
335+
#
318336
class HTTPFound < HTTPRedirection
319337
HAS_BODY = true
320338
end
@@ -323,7 +341,13 @@ class HTTPFound < HTTPRedirection
323341
# Response class for <tt>See Other</tt> responses (status code 303).
324342
#
325343
# The response to the request can be found under another URI using the GET method.
326-
# See {303 See Other}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
344+
#
345+
# References:
346+
#
347+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
348+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
349+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
350+
#
327351
class HTTPSeeOther < HTTPRedirection
328352
HAS_BODY = true
329353
end
@@ -332,7 +356,13 @@ class HTTPSeeOther < HTTPRedirection
332356
#
333357
# Indicates that the resource has not been modified since the version
334358
# specified by the request headers.
335-
# See {304 Not Modified}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
359+
#
360+
# References:
361+
#
362+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
363+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
364+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
365+
#
336366
class HTTPNotModified < HTTPRedirection
337367
HAS_BODY = false
338368
end
@@ -341,7 +371,12 @@ class HTTPNotModified < HTTPRedirection
341371
#
342372
# The requested resource is available only through a proxy,
343373
# whose address is provided in the response.
344-
# See {305 Use Proxy}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
374+
#
375+
# References:
376+
#
377+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
378+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
379+
#
345380
class HTTPUseProxy < HTTPRedirection
346381
HAS_BODY = false
347382
end
@@ -350,15 +385,27 @@ class HTTPUseProxy < HTTPRedirection
350385
#
351386
# The request should be repeated with another URI;
352387
# however, future requests should still use the original URI.
353-
# See {307 Temporary Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
388+
#
389+
# References:
390+
#
391+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
392+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
393+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
394+
#
354395
class HTTPTemporaryRedirect < HTTPRedirection
355396
HAS_BODY = true
356397
end
357398

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

0 commit comments

Comments
 (0)