{"id":20170780,"url":"https://github.com/pear/http2","last_synced_at":"2025-07-07T08:10:27.688Z","repository":{"id":2232809,"uuid":"3186231","full_name":"pear/HTTP2","owner":"pear","description":"Miscellaneous HTTP utilities","archived":false,"fork":false,"pushed_at":"2023-03-22T20:23:06.000Z","size":94,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-24T04:03:34.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pear.php.net/HTTP2","language":"PHP","has_issues":false,"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/pear.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2012-01-15T21:53:13.000Z","updated_at":"2024-12-16T16:01:37.000Z","dependencies_parsed_at":"2023-07-06T07:34:12.572Z","dependency_job_id":null,"html_url":"https://github.com/pear/HTTP2","commit_stats":{"total_commits":124,"total_committers":17,"mean_commits":7.294117647058823,"dds":0.6209677419354839,"last_synced_commit":"72e15b4faa86f6109c6fc3aa82c5515b6453b3b5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pear","download_url":"https://codeload.github.com/pear/HTTP2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144265,"owners_count":21054896,"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":[],"created_at":"2024-11-14T01:20:58.656Z","updated_at":"2025-04-10T02:32:24.761Z","avatar_url":"https://github.com/pear.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"************************************\nHTTP2 - Miscellaneous HTTP utilities\n************************************\nStatic methods for doing miscellaneous HTTP related stuff like\ndate formatting, language negotiation or HTTP redirection.\n\n\nFeatures\n========\n- Language negotiation\n- MIME type negotiation\n- Charset negotiation\n- Send HEAD requests to URLs\n- Make URLs absolute\n- Parse HTTP ``Link:`` header values (RFC 5988)\n\n\nInstallation\n============\n::\n\n    $ composer require pear/http2\n\n\nUsage\n=====\n\nLanguage negotiation\n--------------------\nQuality factors in the ``Accept-Language:`` header are supported, e.g.::\n\n    Accept-Language: en-UK;q=0.7, en-US;q=0.6, no, dk;q=0.8\n\nCode::\n\n    \u003c?php\n    $http = new HTTP2();\n    $langs = array(\n        'en'    =\u003e 'locales/en',\n        'en-US' =\u003e 'locales/en',\n        'en-UK' =\u003e 'locales/en',\n        'de'    =\u003e 'locales/de',\n        'de-DE' =\u003e 'locales/de',\n        'de-AT' =\u003e 'locales/de',\n    );\n    $neg = $http-\u003enegotiateLanguage($langs);\n    $dir = $langs[$neg];\n    ?\u003e\n\n\nCharset negotiation\n-------------------\n::\n\n    \u003c?php\n    $http = new HTTP2();\n    $charsets = array(\n        'UTF-8',\n        'ISO-8859-1',\n    );\n    $charset = $http-\u003enegotiateCharset($charsets);\n    ?\u003e\n\n\nMIME type negotiation\n---------------------\n::\n\n    \u003c?php\n    $http = new HTTP2();\n    $contentType = array(\n        'application/xhtml+xml',\n        'application/xml',\n        'text/html',\n        'text/plain',\n    );\n    $mime = $http-\u003enegotiateMimeType($contentType);\n    ?\u003e\n\n\nLinks\n=====\nHomepage\n  http://pear.php.net/package/HTTP2\nBug tracker\n  http://pear.php.net/bugs/search.php?cmd=display\u0026package_name[]=HTTP2\nDocumentation\n  http://pear.php.net/package/HTTP2/docs\nUnit test status\n  https://travis-ci.org/pear/HTTP2\n\n  .. image:: https://travis-ci.org/pear/HTTP2.svg?branch=master\n     :target: https://travis-ci.org/pear/HTTP2\nPackagist\n  https://packagist.org/packages/pear/http2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpear%2Fhttp2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpear%2Fhttp2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpear%2Fhttp2/lists"}