{"id":15032779,"url":"https://github.com/ruby/net-http","last_synced_at":"2025-10-08T22:18:30.354Z","repository":{"id":37800126,"uuid":"240201155","full_name":"ruby/net-http","owner":"ruby","description":"Net::HTTP provides a rich library which can be used to build HTTP user-agents.","archived":false,"fork":false,"pushed_at":"2025-09-15T23:11:47.000Z","size":1186,"stargazers_count":120,"open_issues_count":45,"forks_count":77,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-10-02T15:30:38.941Z","etag":null,"topics":["hacktoberfest","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-13T07:25:31.000Z","updated_at":"2025-09-28T12:41:39.000Z","dependencies_parsed_at":"2023-02-13T03:15:57.904Z","dependency_job_id":"2c7015c6-0ba4-464b-aca8-cfa6940cbf00","html_url":"https://github.com/ruby/net-http","commit_stats":{"total_commits":677,"total_committers":80,"mean_commits":8.4625,"dds":0.8035450516986706,"last_synced_commit":"d39f1e35da0094759356a49a3c96fea84325c388"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ruby/net-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/net-http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278189951,"owners_count":25945224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","ruby"],"created_at":"2024-09-24T20:19:26.099Z","updated_at":"2025-10-08T22:18:30.310Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# Net::HTTP\n\nNet::HTTP provides a rich library which can be used to build HTTP\nuser-agents.  For more details about HTTP see\n[RFC9110 HTTP Semantics](https://www.ietf.org/rfc/rfc9110.html) and\n[RFC9112 HTTP/1.1](https://www.ietf.org/rfc/rfc9112.html).\n\nNet::HTTP is designed to work closely with URI.  URI::HTTP#host,\nURI::HTTP#port and URI::HTTP#request_uri are designed to work with\nNet::HTTP.\n\nIf you are only performing a few GET requests you should try OpenURI.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'net-http'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install net-http\n\n## Usage\n\nAll examples assume you have loaded Net::HTTP with:\n\n```ruby\nrequire 'net/http'\n```\n\nThis will also require 'uri' so you don't need to require it separately.\n\nThe Net::HTTP methods in the following section do not persist\nconnections.  They are not recommended if you are performing many HTTP\nrequests.\n\n### GET\n\n```ruby\nNet::HTTP.get('example.com', '/index.html') # =\u003e String\n```\n\n### GET by URI\n\n```ruby\nuri = URI('http://example.com/index.html?count=10')\nNet::HTTP.get(uri) # =\u003e String\n```\n\n### GET with Dynamic Parameters\n\n```ruby \nuri = URI('http://example.com/index.html')\nparams = { :limit =\u003e 10, :page =\u003e 3 }\nuri.query = URI.encode_www_form(params)\n\nres = Net::HTTP.get_response(uri)\nputs res.body if res.is_a?(Net::HTTPSuccess)\n```\n\n### POST\n\n```ruby\nuri = URI('http://www.example.com/search.cgi')\nres = Net::HTTP.post_form(uri, 'q' =\u003e 'ruby', 'max' =\u003e '50')\nputs res.body\n```\n\n### POST with Multiple Values\n\n```ruby\nuri = URI('http://www.example.com/search.cgi')\nres = Net::HTTP.post_form(uri, 'q' =\u003e ['ruby', 'perl'], 'max' =\u003e '50')\nputs res.body\n```\n\n## Development\n\nAfter 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.\n\nTo 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](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/net-http.\n\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fnet-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fnet-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fnet-http/lists"}