Enhanced RDoc for Net::HTTP#130
Merged
peterzhu2118 merged 4 commits intoruby:masterfrom Mar 8, 2023
BurdetteLamar:http_doc
Merged
Enhanced RDoc for Net::HTTP#130peterzhu2118 merged 4 commits intoruby:masterfrom BurdetteLamar:http_doc
peterzhu2118 merged 4 commits intoruby:masterfrom
BurdetteLamar:http_doc
Conversation
peterzhu2118
reviewed
Mar 6, 2023
lib/net/http/response.rb
Outdated
Comment on lines
243
to
247
| # res.body_encoding # => false | ||
| # res.body_encoding = Encoding::US_ASCII | ||
| # res.body_encoding # => #<Encoding:US-ASCII> | ||
| # res.body_encoding = 'US-ASCII' | ||
| # res.body_encoding # => #<Encoding:US-ASCII> |
Member
There was a problem hiding this comment.
This example doesn't really show what the purpose of this method is. It just show that it is a setter.
Member
Author
There was a problem hiding this comment.
Not sure what you mean. Suggestion?
Member
There was a problem hiding this comment.
What I mean is that this example isn't showing the purpose of the #body_encoding=.
An example like this shows the purpose:
http = Net::HTTP.new(hostname)
req = Net::HTTP::Get.new('/')
http.request(req) do |res|
p res.body.encoding # => #<Encoding:ASCII-8BIT>
end
http.request(req) do |res|
res.body_encoding = "UTF-8"
p res.body.encoding # => #<Encoding:UTF-8>
end
Member
Author
There was a problem hiding this comment.
Substituted in, and thanks.
Member
Author
|
@peterzhu2118, ready for you. |
peterzhu2118
reviewed
Mar 8, 2023
peterzhu2118
approved these changes
Mar 8, 2023
matzbot
pushed a commit
to ruby/ruby
that referenced
this pull request
Mar 8, 2023
nagachika
added a commit
to nagachika/ruby
that referenced
this pull request
Dec 16, 2023
…0a5659cadb49f1640b20896cd750decdbbd701,c8c3431b0a5995d58f97c511ffa0a39e0f19c75e,755c379d877c66916d20840f07738d6050da3ca2,030f39822ac9d6d7dcdb639e099b320d3517c19c,2f19c5b7e080f75c3373c5b1671b4d4cfab6d334: [ruby/net-http] [DOC] What's Here for Net:HTTP (ruby/net-http#128) ruby/net-http@39e70f0f9b --- lib/net/http.rb | 269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 267 insertions(+), 2 deletions(-) Replaced non-ascii charactor. It fails version detection at `net-http.gemspec`. ># Returns the X509 certificate chain for the session<E2><80><99>s socket peer. --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Test building packages Also revert commit ruby/net-http@d22ca54904de "Replaced non-ascii charactor. It fails version detection at `net-http.gemspec`." ruby/net-http@fbeb247d93 --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Read in binary mode to get rid of invalid byte sequence ruby/net-http@38de3d17a7 --- lib/net/http/net-http.gemspec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) [ruby/net-http] Exclude git related files ruby/net-http@2767df580d --- lib/net/http/net-http.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Re-apply ruby/net-http@d22ca54904de after testing ruby/net-http@7ac7401a9c --- lib/net/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [ruby/net-http] Enhanced RDoc for Net::HTTP (ruby/net-http#130) ruby/net-http@698e18cfc1 --- lib/net/http/response.rb | 53 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 17 deletions(-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Treats a couple of methods; most are private or nodoc.