Bump step-security/harden-runner from 2.22.4 to 2.23.0

Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.22.4 to 2.23.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/1d88384fd173af6ecb012dfd0264a306b711241a...aebdcf6156ab6691adf63218240e476564a1ed4c)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
1 file changed
tree: 97a462e778dddeccc21870db99b0f833a3b5911a
  1. .github/
  2. bin/
  3. doc/
  4. lib/
  5. sig/
  6. test/
  7. test_sig/
  8. .document
  9. .gitignore
  10. BSDL
  11. COPYING
  12. Gemfile
  13. net-http.gemspec
  14. Rakefile
  15. README.md
README.md

Net::HTTP

Net::HTTP provides a rich library which can be used to build HTTP user-agents. For more details about HTTP see RFC9110 HTTP Semantics and RFC9112 HTTP/1.1.

Net::HTTP is designed to work closely with URI. URI::HTTP#host, URI::HTTP#port and URI::HTTP#request_uri are designed to work with Net::HTTP.

If you are only performing a few GET requests you should try OpenURI.

Installation

Add this line to your application's Gemfile:

gem 'net-http'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install net-http

Usage

All examples assume you have loaded Net::HTTP with:

require 'net/http'

This will also require ‘uri’ so you don't need to require it separately.

The Net::HTTP methods in the following section do not persist connections. They are not recommended if you are performing many HTTP requests.

GET

Net::HTTP.get('example.com', '/index.html') # => String

GET by URI

uri = URI('http://example.com/index.html?count=10')
Net::HTTP.get(uri) # => String

GET with Dynamic Parameters

uri = URI('http://example.com/index.html')
params = { :limit => 10, :page => 3 }
uri.query = URI.encode_www_form(params)

res = Net::HTTP.get_response(uri)
puts res.body if res.is_a?(Net::HTTPSuccess)

POST

uri = URI('http://www.example.com/search.cgi')
res = Net::HTTP.post_form(uri, 'q' => 'ruby', 'max' => '50')
puts res.body

POST with Multiple Values

uri = URI('http://www.example.com/search.cgi')
res = Net::HTTP.post_form(uri, 'q' => ['ruby', 'perl'], 'max' => '50')
puts res.body

See the documentation for more details.

Development

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.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/net-http.