Skip to content

Add link to detailed Net::HTTP documentation in README Usage section#276

Merged
kou merged 2 commits intoruby:masterfrom
tkf0029:add-information-link
Feb 19, 2026
Merged

Add link to detailed Net::HTTP documentation in README Usage section#276
kou merged 2 commits intoruby:masterfrom
tkf0029:add-information-link

Conversation

@tkf0029
Copy link
Contributor

@tkf0029 tkf0029 commented Feb 13, 2026

Problem

When looking at the README on GitHub, it's unclear where to find more detailed information.

The README for the Net::HTTP gem includes the following sections:

  • Overview
  • Installation
  • Usage
    • GET
    • GET by URI
    • GET with Dynamic Parameters
    • POST
    • POST with Multiple Values
  • Development
  • Contributing

The file net-http/doc/net-http/examples.rdoc also contains some simple usage examples.

However, it is not clear where to look for following information:

  • Details of the get or post_form methods used in the sample code:
    • Supported argument types
    • Return values
  • Other ways to implement GET or POST requests
  • Links to documentation covering the above

Objective

To allow users of the net-http gem to easily find detailed information and sample code for implementing basic HTTP requests using net-http.


Proposal

Add a link at the bottom of the README's Usage section pointing to documentation with more detailed information.


The link is added only, without duplicating examples from rdoc, to avoid divergence between the README and official documentation.

@tkf0029 tkf0029 changed the title Add link to detailed Net::HTTP documentation in Usage section Add link to detailed Net::HTTP documentation in README Usage section Feb 13, 2026
README.md Outdated
puts res.body
```

[For more information](https://docs.ruby-lang.org/en/4.0/Net/HTTP.html#public-class-methods)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • How about using .../master/... not .../4.0/... because we don't want to maintain the version number here?
  • Can we remove #public-class-methods? It seems that it's not useful here.

Copy link
Contributor Author

@tkf0029 tkf0029 Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you the suggesions.

1. About using .../master/... instead of .../4.0/...

  • You're right — maintaining a specific version number in the README would require updates whenever the version changes. I’ll update the link to use .../master/... instead.

2. About removing #public-class-methods

  • I originally added the heading anchor because the examples in the README use class methods, and I personally hesitated about where to look in the documentation. However:
    • Jumping directly to a specific section may feel a bit abrupt.
    • The fragment (#public-class-methods) could change in the future.
  • For these reasons, I’ll replace it with a link to the top-level documentation page without the fragment

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit 262fb2f into ruby:master Feb 19, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments