{"id":51637800,"url":"https://github.com/mohamedahmed01/http-query-polyfill","last_synced_at":"2026-07-13T16:33:02.553Z","repository":{"id":371034125,"uuid":"1298621285","full_name":"mohamedahmed01/http-query-polyfill","owner":"mohamedahmed01","description":"Backward-compatible polyfill for Laravel's Http::query() method (RFC 10008) on Laravel \u003c 13.19","archived":false,"fork":false,"pushed_at":"2026-07-12T21:19:14.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-12T23:08:47.681Z","etag":null,"topics":["http","laravel","ployfill","query"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamedahmed01.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-12T21:03:30.000Z","updated_at":"2026-07-12T21:19:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mohamedahmed01/http-query-polyfill","commit_stats":null,"previous_names":["mohamedahmed01/http-query-polyfill"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mohamedahmed01/http-query-polyfill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedahmed01%2Fhttp-query-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedahmed01%2Fhttp-query-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedahmed01%2Fhttp-query-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedahmed01%2Fhttp-query-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamedahmed01","download_url":"https://codeload.github.com/mohamedahmed01/http-query-polyfill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamedahmed01%2Fhttp-query-polyfill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35429403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","laravel","ployfill","query"],"created_at":"2026-07-13T16:33:02.001Z","updated_at":"2026-07-13T16:33:02.546Z","avatar_url":"https://github.com/mohamedahmed01.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel HTTP Query Polyfill\n\nBackward-compatible polyfill for [`Http::query()`](https://github.com/laravel/framework/pull/60663) introduced in Laravel 13.19.0 (RFC 10008).\n\nOn Laravel **\u0026lt; 13.19**, this package registers `PendingRequest::query()` so you can send HTTP `QUERY` requests with a body. On Laravel **13.19+**, registration is skipped and the native method is used unchanged.\n\n## Installation\n\n```bash\ncomposer require mohamedahmed01/laravel-http-query-polyfill\n```\n\nThe service provider is auto-discovered. No further setup is required.\n\n## Usage\n\nSame API as Laravel 13.19+:\n\n```php\nuse Illuminate\\Support\\Facades\\Http;\n\n$response = Http::query('https://api.example.com/search', [\n    'filter' =\u003e ['status' =\u003e 'active'],\n]);\n```\n\nJSON is the default body format. Use existing fluent helpers for other formats:\n\n```php\nHttp::asForm()-\u003equery('https://api.example.com/search', [\n    'filter' =\u003e 'active',\n]);\n```\n\nURL query strings are unchanged — keep using `withQueryParameters()` or `Http::get($url, $query)` for those.\n\n## Testing helpers (Laravel \u0026lt; 13.19)\n\nLaravel 13.19 also added `$this-\u003equery()` / `$this-\u003equeryJson()` on HTTP tests. Those live on a trait, so they cannot be auto-registered. On older Laravel, add the polyfill trait to your base test case:\n\n```php\nuse Illuminate\\Foundation\\Testing\\TestCase as BaseTestCase;\nuse MohamedAhmed01\\HttpQueryPolyfill\\Testing\\MakesHttpQueryRequests;\n\nabstract class TestCase extends BaseTestCase\n{\n    use MakesHttpQueryRequests;\n}\n```\n\nThen:\n\n```php\n$this-\u003equeryJson('/search', ['filter' =\u003e 'active'])-\u003eassertOk();\n```\n\nDo **not** use this trait on Laravel 13.19+ — the methods already exist and will collide.\n\n## Compatibility\n\n| Laravel | Behavior |\n|---------|----------|\n| 10.x – 13.18 | Macro polyfill registered |\n| 13.19+ | No-op; native `Http::query()` used |\n\n## Live integration (optional)\n\nAgainst [Ayder](https://github.com/A1darbek/ayder)'s `/broker/query` QUERY endpoint:\n\n```bash\n# from an Ayder checkout\ndocker compose up -d --build\ncurl -fsS http://127.0.0.1:1109/health\n\n# from this package\nvendor/bin/phpunit --filter AyderHttpQueryIntegrationTest\n```\n\nCoverage includes:\n- `Http::query()` with a JSON body against a real QUERY server\n- `Accept-Query`, `ETag`, `Content-Location`\n- conditional revalidation with `If-None-Match` → `304`\n\nTests skip automatically when Ayder is not reachable. Override with `AYDER_BASE_URL` / `AYDER_TOKEN`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedahmed01%2Fhttp-query-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedahmed01%2Fhttp-query-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedahmed01%2Fhttp-query-polyfill/lists"}