{"id":20975266,"url":"https://github.com/blueridgemountains1/xttp","last_synced_at":"2026-04-24T11:04:32.050Z","repository":{"id":52229378,"uuid":"239648711","full_name":"blueridgemountains1/xttp","owner":"blueridgemountains1","description":"A guzzle wrapper with typehints and syntactic sugar in PHP","archived":false,"fork":false,"pushed_at":"2021-05-04T10:33:46.000Z","size":89,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T05:11:13.167Z","etag":null,"topics":["guzzle","guzzle-middleware","guzzlehttp","laravel","php"],"latest_commit_sha":null,"homepage":"https://johnathansmith.com/xttp/","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/blueridgemountains1.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":"2020-02-11T01:17:30.000Z","updated_at":"2023-02-05T04:41:40.000Z","dependencies_parsed_at":"2022-08-21T13:21:00.241Z","dependency_job_id":null,"html_url":"https://github.com/blueridgemountains1/xttp","commit_stats":null,"previous_names":["jr-smith/xttp"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueridgemountains1%2Fxttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueridgemountains1%2Fxttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueridgemountains1%2Fxttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blueridgemountains1%2Fxttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blueridgemountains1","download_url":"https://codeload.github.com/blueridgemountains1/xttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243374326,"owners_count":20280661,"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":["guzzle","guzzle-middleware","guzzlehttp","laravel","php"],"created_at":"2024-11-19T04:41:40.867Z","updated_at":"2025-12-29T11:45:20.136Z","avatar_url":"https://github.com/blueridgemountains1.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xttp\n\n![](https://johnathansmith.com/uploads/xttp-logo-white.png)\n\n### A guzzle wrapper with typehints and syntactic sugar. \n\nRegular use is simple:\n```php\n\u003c?php\nuse JohnathanSmith\\Xttp\\Xttp;\n\n/** @var \\JohnathanSmith\\Xttp\\XttpResponseWrapper $xttpResponse */\n\n$xttpResponse = Xttp::post('https://johnathansmith.com', ['form_params' =\u003e ['foo' =\u003e 'bar'], 'headers' =\u003e ['Content-Type' =\u003e 'application/x-www-form-urlencoded']]);\n\n// You may also do get, put, patch, delete.\n```\n\nThere is also a [package for Laravel](https://github.com/jr-smith/xttp-laravel).\n\nAfter making the request you will get an instance of `XttpResponse`. This\nhas a lot of syntactic sugar, for example:\n- Getting header/s\n- Getting response status and info\n- Returning JSON or body\n- Getting URL\n- Cookies\n\nOne of the ways that this package shines\nis that it is set up to be very friendly\nwith Unit testing. You can also easily\ncreate a _longer_ version from above with an large amount of granular detail. You can do this on XttpPending the object. With this we can:\n- Add Cookies/Headers/Options\n- Add or prepend Request/Response/Retry/Other middleware\n- Guzzle History and/or Mock handlers\n- Authorization\n- Guzzle Client Construction\n\n```php\n\u003c?php\nuse JohnathanSmith\\Xttp\\XttpPending;\n\n$response = XttpPending::new()\n-\u003esetUrl(// url)\n-\u003esetMethod(// method)\n-\u003ewithHeaders(['X-Foo' =\u003e 'Bar'])\n-\u003easJson()\n-\u003esend();\n```\n\n\nXttp was inspired by Adam Wathan's [zttp](https://github.com/kitetail/zttp). A special thanks to the maintainers of Guzzle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueridgemountains1%2Fxttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblueridgemountains1%2Fxttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueridgemountains1%2Fxttp/lists"}