{"id":22092103,"url":"https://github.com/krakphp/http-message","last_synced_at":"2025-03-23T23:44:52.515Z","repository":{"id":57009013,"uuid":"92961535","full_name":"krakphp/http-message","owner":"krakphp","description":"PSR7 Http Message Utilities","archived":false,"fork":false,"pushed_at":"2017-05-31T15:36:45.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T04:17:27.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/krakphp.png","metadata":{"files":{"readme":"README.md","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":"2017-05-31T15:36:21.000Z","updated_at":"2017-05-31T15:36:40.000Z","dependencies_parsed_at":"2022-08-21T14:50:47.891Z","dependency_job_id":null,"html_url":"https://github.com/krakphp/http-message","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fhttp-message","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fhttp-message/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fhttp-message/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fhttp-message/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krakphp","download_url":"https://codeload.github.com/krakphp/http-message/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186923,"owners_count":20574554,"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-12-01T03:08:20.104Z","updated_at":"2025-03-23T23:44:52.491Z","avatar_url":"https://github.com/krakphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Http Message Utilities\n\nSimple utilities for the psr http message (psr7) specification.\n\n## Headers\n\nWe provide several utilities for parsing special headers.\n\nEach header class is named after the specific http header and has the following functions for parsing and signing.\n\nHere's an example using the AcceptHeader class\n\n```php\n\u003c?php\n\nuse Krak\\HttpMessage;\n\n// grab from a psr http message\n$accept_header = HttpMessage\\AcceptHeader::fromHttpMessage($psr_req);\n// parse from a string\n$accept_header = HttpMessage\\AcceptHeader::fromString('text/*;q=0.1,text/html;q=0.2');\n\n// You can then sign an http message with the header, which will write the value of the header into the req.\n$req = $accept_header-\u003esignHttpMessage($req);\n\n// You can also export the header as a string\necho $accept_header;\n```\n\nWe provide abstractions with the following classes:\n\n- `Krak\\HttpMessage\\AuthorizationHeader`\n- `Krak\\HttpMessage\\AcceptHeader`\n- `Krak\\HttpMessage\\ContentTypeHeader`\n\n## Matchers\n\nThe `Krak\\HttpMessage\\Match` directory holds functional utilities for creating matchers for http message requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakphp%2Fhttp-message","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrakphp%2Fhttp-message","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakphp%2Fhttp-message/lists"}