Skip to content

Commit 262fb2f

Browse files
authored
Add link to detailed Net::HTTP documentation in README Usage section (#276)
## Problem When looking at the [README](https://github.com/ruby/net-http?tab=readme-ov-file) on GitHub, it's unclear where to find more detailed information. The [README](https://github.com/ruby/net-http?tab=readme-ov-file#usage) 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](https://github.com/ruby/net-http/blob/master/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](https://developer.mozilla.org/ja/docs/Web/HTTP/Reference/Methods) using `net-http`. --- ## Proposal Add a link at the bottom of the README's [Usage](https://github.com/ruby/net-http?tab=readme-ov-file#development) 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.
1 parent 4ecc9c6 commit 262fb2f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ res = Net::HTTP.post_form(uri, 'q' => ['ruby', 'perl'], 'max' => '50')
8181
puts res.body
8282
```
8383

84+
See the [documentation](https://docs.ruby-lang.org/en/master/Net/HTTP.html) for more details.
85+
8486
## Development
8587

8688
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

0 commit comments

Comments
 (0)