{"id":29131975,"url":"https://github.com/crell/httptools","last_synced_at":"2025-06-30T06:10:14.230Z","repository":{"id":292974155,"uuid":"982508191","full_name":"Crell/HttpTools","owner":"Crell","description":"Simple utiliities to make working with PSR-7 response objects a little easier.","archived":false,"fork":false,"pushed_at":"2025-06-13T20:19:14.000Z","size":43,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T07:46:58.441Z","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":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Crell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["Crell"]}},"created_at":"2025-05-13T01:59:18.000Z","updated_at":"2025-06-13T20:19:17.000Z","dependencies_parsed_at":"2025-05-22T04:00:33.143Z","dependency_job_id":null,"html_url":"https://github.com/Crell/HttpTools","commit_stats":null,"previous_names":["crell/responsebuilder","crell/httptools"],"tags_count":4,"template":false,"template_full_name":"Crell/php-project-template","purl":"pkg:github/Crell/HttpTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crell%2FHttpTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crell%2FHttpTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crell%2FHttpTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crell%2FHttpTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crell","download_url":"https://codeload.github.com/Crell/HttpTools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crell%2FHttpTools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262720693,"owners_count":23353452,"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":"2025-06-30T06:10:13.543Z","updated_at":"2025-06-30T06:10:14.217Z","avatar_url":"https://github.com/Crell.png","language":"PHP","funding_links":["https://github.com/sponsors/Crell"],"categories":[],"sub_categories":[],"readme":"# PSR HTTP Tools\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Total Downloads][ico-downloads]][link-downloads]\n\nThis library is a loose collection of tools to make working with the PSR HTTP stack a bit easier.\n\n## Included tools\n\n### HttpStatus\n\nYet another Enum listing the different typical HTTP response codes used.\n\n### ResponseBuilder\n\nResponseBuilder is a simple convenience wrapper around the PSR-17 factory classes.  It provides a single, easy to use \"builder\" class that produces common PSR-7 response objects types.  You may bring your own PSR-17 factory of your choice.\n\nSee the [ResponseBuilder](src/ResponseBuilder.php) class, as its methods should be fairly self-explantory just from their names.\n\n### CacheHeaderMiddleware\n\nThis zero-configuration middleware ensures that cache headers are stripped from requests/responses that should not have them, according to the HTTP spec.\n\n### EnforceHeadMiddleware\n\nEnsures that the response to a HEAD request has an empty body, even if one was incorrectly set.\n\n### DefaultContentTypeMiddleware\n\nAllows setting a default `content-type` and `accept` header value on incoming requests.  Useful for APIs that allow clients to not specify those headers, without code further on needing to account for it being missing.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please use the [GitHub security reporting form](https://github.com/Crell/HttpTools/security) rather than the issue queue.\n\n## Credits\n\n- [Larry Garfield][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe Lesser GPL version 3 or later. Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/Crell/HttpTools.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/License-LGPLv3-green.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/Crell/HttpTools.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/Crell/HttpTools\n[link-scrutinizer]: https://scrutinizer-ci.com/g/Crell/HttpTools/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/Crell/HttpTools\n[link-downloads]: https://packagist.org/packages/Crell/HttpTools\n[link-author]: https://github.com/Crell\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrell%2Fhttptools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrell%2Fhttptools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrell%2Fhttptools/lists"}