{"id":19885677,"url":"https://github.com/asmod4n/mruby-phr","last_synced_at":"2025-05-02T16:31:46.006Z","repository":{"id":25737623,"uuid":"29175098","full_name":"Asmod4n/mruby-phr","owner":"Asmod4n","description":"mruby wrapper for https://github.com/h2o/picohttpparser","archived":false,"fork":false,"pushed_at":"2025-01-16T21:27:08.000Z","size":43,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T03:34:34.936Z","etag":null,"topics":["http-parser","mruby","picohttpparser"],"latest_commit_sha":null,"homepage":"","language":"C","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/Asmod4n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2015-01-13T05:54:17.000Z","updated_at":"2025-01-16T21:27:09.000Z","dependencies_parsed_at":"2024-04-05T23:32:11.927Z","dependency_job_id":"9bfc69e2-88ac-4d14-8093-61e8ebbe7646","html_url":"https://github.com/Asmod4n/mruby-phr","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/Asmod4n%2Fmruby-phr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-phr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-phr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-phr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asmod4n","download_url":"https://codeload.github.com/Asmod4n/mruby-phr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252071845,"owners_count":21690100,"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","mruby","picohttpparser"],"created_at":"2024-11-12T17:35:16.420Z","updated_at":"2025-05-02T16:31:45.545Z","avatar_url":"https://github.com/Asmod4n.png","language":"C","readme":"# mruby-phr\nA small http parser for mruby based on https://github.com/h2o/picohttpparser\n\nExamples\n=======\n```ruby\nbuffer = \"HTTP/1.1 200 OK\\r\\nContent-Length: 5\\r\\nConnection: close\\r\\n\\r\\nhallo\"\n\nphr = Phr.new\noffset = phr.parse_response buffer\nputs phr.minor_version\nputs phr.status\nputs phr.msg\nputs phr.headers\nbody = buffer[offset..-1]\nputs body\nphr.reset\n\nbuffer = \"POST / HTTP/1.1\\r\\nHost: www.google.com\\r\\nContent-Length: 5\\r\\nConnection: close\\r\\n\\r\\nhallo\"\noffset = phr.parse_request buffer\nputs phr.method\nputs phr.path\nputs phr.minor_version\nputs phr.headers\nbody = buffer[offset..-1]\nputs body\nphr.reset\n\nbuffer = \"b\\r\\nhello world\\r\\n0\\r\\n\"\nphr.decode_chunked(buffer)\nputs buffer\nphr.reset\n```\n\nReturn values\n-------------\nPhr has three response values\n:parser_error when a request was malformed\n:incomplete when the supplied buffer doesnt hold a complete request\nOr a Integer value describing where the body starts.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmod4n%2Fmruby-phr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmod4n%2Fmruby-phr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmod4n%2Fmruby-phr/lists"}