{"id":15022667,"url":"https://github.com/puppetlabs/net_http_unix","last_synced_at":"2025-09-22T22:04:55.269Z","repository":{"id":20646797,"uuid":"23928789","full_name":"puppetlabs/net_http_unix","owner":"puppetlabs","description":"AF_UNIX domain socket support on top of Ruby's Net::HTTP libraries","archived":false,"fork":false,"pushed_at":"2025-02-04T02:14:37.000Z","size":20,"stargazers_count":21,"open_issues_count":1,"forks_count":6,"subscribers_count":73,"default_branch":"master","last_synced_at":"2025-07-28T05:38:58.808Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-11T17:41:38.000Z","updated_at":"2023-12-20T12:59:40.000Z","dependencies_parsed_at":"2025-02-22T06:10:46.113Z","dependency_job_id":"011b09f6-726b-427c-b288-b72bda04bde8","html_url":"https://github.com/puppetlabs/net_http_unix","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/puppetlabs/net_http_unix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fnet_http_unix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fnet_http_unix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fnet_http_unix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fnet_http_unix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/net_http_unix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fnet_http_unix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276481088,"owners_count":25649989,"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-09-22T02:00:08.972Z","response_time":79,"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":[],"created_at":"2024-09-24T19:58:15.233Z","updated_at":"2025-09-22T22:04:55.250Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetX::HTTPUnix\n\nThis gem is a small wrapper around Ruby's `Net::HTTP` interface that provides\nsupport for unix domain sockets.  If you need to issue HTTP requests to a HTTP\nserver listening on a local unix domain socket then this library is for you.\n\nSimply `require 'net_x/http_unix'` in place of `require 'net/http'` and use\n`NetX::HTTPUnix` as you would `Net::HTTP`.  Address strings starting with\n'unix://' will automatically be handled by a unix domain socket instead of a\nTCP socket.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'net_http_unix'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install net_http_unix\n\n## Usage\n\nUse the library just like you would `Net::HTTP.start` and `Net::HTTP.new`, but\nwith `NetX::HTTPUnix.start` and `NetX::HTTPUnix.new`.\n\nFor example a traditional SSL client works as expected:\n\n```ruby\nrequire 'net_http_unix'\nreq = Net::HTTP::Get.new(\"/status.json\")\nclient = NetX::HTTPUnix.new('github.com', 443)\nclient.use_ssl = true\nclient.verify_mode = OpenSSL::SSL::VERIFY_NONE\nresp = client.request(req)\nputs resp.body\n{\"status\":\"ok\",\"configuration_id\":0}\n```\n\nAnd the corresponding `unix:///path/to/foo.sock` URI syntax:\n\n```ruby\nrequire 'net_http_unix'\nreq = Net::HTTP::Get.new(\"/status.json\")\nclient = NetX::HTTPUnix.new('unix:///tmp/unicorn.sock')\nresp = client.request(req)\nputs resp.body\n{\"status\":\"ok\",\"configuration_id\":0,\"socket\":true}\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fnet_http_unix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fnet_http_unix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fnet_http_unix/lists"}