{"id":20339400,"url":"https://github.com/matsadler/http_tools","last_synced_at":"2025-04-11T23:13:26.463Z","repository":{"id":56876895,"uuid":"1235639","full_name":"matsadler/http_tools","owner":"matsadler","description":"Pure Ruby HTTP parser and friends","archived":false,"fork":false,"pushed_at":"2013-05-15T11:55:36.000Z","size":260,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T23:13:20.290Z","etag":null,"topics":["http","parser","ruby"],"latest_commit_sha":null,"homepage":"http://sourcetagsandcodes.com/http_tools/doc/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matsadler.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-09T18:17:12.000Z","updated_at":"2023-09-24T01:26:55.000Z","dependencies_parsed_at":"2022-08-20T11:30:36.267Z","dependency_job_id":null,"html_url":"https://github.com/matsadler/http_tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsadler%2Fhttp_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsadler%2Fhttp_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsadler%2Fhttp_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsadler%2Fhttp_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsadler","download_url":"https://codeload.github.com/matsadler/http_tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492877,"owners_count":21113163,"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","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":["http","parser","ruby"],"created_at":"2024-11-14T21:16:50.057Z","updated_at":"2025-04-11T23:13:26.431Z","avatar_url":"https://github.com/matsadler.png","language":"Ruby","readme":"= HTTPTools {\u003cimg src=https://secure.travis-ci.org/matsadler/http_tools.png\u003e}[http://travis-ci.org/matsadler/http_tools]\n\nHTTPTools is a collection of lower level utilities to aid working with HTTP,\nincluding a fast-as-possible pure Ruby HTTP parser.\n\n* rdoc[http://sourcetagsandcodes.com/http_tools/doc/]\n* source[https://github.com/matsadler/http_tools]\n\n== Platform Support\n\nWritten purely in Ruby, with no dependencies outside of the standard library, it\nshould run across all Ruby implementations compatible with 1.8 or later, and\ninstall in environments without a compiler available.\n\nTests are currently run on travis-ci[http://travis-ci.org/matsadler/http_tools]\nagainst Ruby 1.8.7, 1.9.2, 1.9.3, JRuby, Rubinius, and Ruby\nEnterprise Edition. Additionally tests are run against 1.8.6 and MacRuby\n\nPerformance tuning is mainly aimed at Ruby 1.9, with Ruby 1.8 and JRuby taken in\nto consideration. JRuby is generally fastest.\n\n== HTTPTools::Parser\n\nHTTPTools::Parser is a HTTP request \u0026 response parser with an evented API.\nDespite being just Ruby, every effort has been made to ensure it is as fast as\npossible.\n\n=== Example\n\n  parser = HTTPTools::Parser.new\n  parser.on(:header) do\n    puts parser.status_code.to_s + \" \" + parser.message\n    puts parser.header.inspect\n  end\n  parser.on(:finish) {print parser.body}\n  \n  parser \u003c\u003c \"HTTP/1.1 200 OK\\r\\n\"\n  parser \u003c\u003c \"Content-Length: 20\\r\\n\\r\\n\"\n  parser \u003c\u003c \"\u003ch1\u003eHello world\u003c/h1\u003e\"\n\nPrints:\n  200 OK\n  {\"Content-Length\" =\u003e \"20\"}\n  \u003ch1\u003eHello world\u003c/h1\u003e\n\n== HTTPTools::Encoding\n\nHTTPTools::Encoding provides methods to deal with several HTTP related encodings\nincluding url, www-form, and chunked transfer encoding. It can be used as a\nmixin or class methods on HTTPTools::Encoding.\n\n=== Example\n\n  HTTPTools::Encoding.www_form_encode({\"query\" =\u003e \"fish\", \"lang\" =\u003e \"en\"})\n  #=\u003e \"query=fish\u0026lang=en\"\n  \n  include HTTPTools::Encoding\n  www_form_decode(\"lang=en\u0026query=fish\")\n  #=\u003e {\"lang\" =\u003e \"en\", \"query\" =\u003e \"fish\"}\n\n== HTTPTools::Builder\n\nHTTPTools::Builder is a provides a simple interface to build HTTP requests \u0026\nresponses. It can be used as a mixin or class methods on HTTPTools::Builder.\n\n=== Example\n\n  Builder.request(:get, \"example.com\")\n  #=\u003e \"GET / HTTP/1.1\\r\\nHost: example.com\\r\\n\\r\\n\"\n\n== Licence\n\n(The MIT License)\n\nCopyright (c) 2012, 2011 Matthew Sadler\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsadler%2Fhttp_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsadler%2Fhttp_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsadler%2Fhttp_tools/lists"}