PHPackages                             mohamedahmed01/laravel-http-query-polyfill - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. mohamedahmed01/laravel-http-query-polyfill

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mohamedahmed01/laravel-http-query-polyfill
==========================================

Backward-compatible polyfill for Laravel's Http::query() method (RFC 10008) on Laravel &lt; 13.19

v1.0.1(1mo ago)12MITPHPPHP ^8.1CI passing

Since Jul 12Pushed 1mo agoCompare

[ Source](https://github.com/mohamedahmed01/http-query-polyfill)[ Packagist](https://packagist.org/packages/mohamedahmed01/laravel-http-query-polyfill)[ RSS](/packages/mohamedahmed01-laravel-http-query-polyfill/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Laravel HTTP Query Polyfill
===========================

[](#laravel-http-query-polyfill)

Backward-compatible polyfill for [`Http::query()`](https://github.com/laravel/framework/pull/60663) introduced in Laravel 13.19.0 (RFC 10008).

On Laravel **&lt; 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.

Installation
------------

[](#installation)

```
composer require mohamedahmed01/laravel-http-query-polyfill
```

The service provider is auto-discovered. No further setup is required.

Usage
-----

[](#usage)

Same API as Laravel 13.19+:

```
use Illuminate\Support\Facades\Http;

$response = Http::query('https://api.example.com/search', [
    'filter' => ['status' => 'active'],
]);
```

JSON is the default body format. Use existing fluent helpers for other formats:

```
Http::asForm()->query('https://api.example.com/search', [
    'filter' => 'active',
]);
```

URL query strings are unchanged — keep using `withQueryParameters()` or `Http::get($url, $query)` for those.

Testing helpers (Laravel &lt; 13.19)
------------------------------------

[](#testing-helpers-laravel--1319)

Laravel 13.19 also added `$this->query()` / `$this->queryJson()` 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:

```
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use MohamedAhmed01\HttpQueryPolyfill\Testing\MakesHttpQueryRequests;

abstract class TestCase extends BaseTestCase
{
    use MakesHttpQueryRequests;
}
```

Then:

```
$this->queryJson('/search', ['filter' => 'active'])->assertOk();
```

Do **not** use this trait on Laravel 13.19+ — the methods already exist and will collide.

Compatibility
-------------

[](#compatibility)

LaravelBehavior10.x – 13.18Macro polyfill registered13.19+No-op; native `Http::query()` usedLive integration (optional)
---------------------------

[](#live-integration-optional)

Against [Ayder](https://github.com/A1darbek/ayder)'s `/broker/query` QUERY endpoint:

```
# from an Ayder checkout
docker compose up -d --build
curl -fsS http://127.0.0.1:1109/health

# from this package
vendor/bin/phpunit --filter AyderHttpQueryIntegrationTest
```

Coverage includes:

- `Http::query()` with a JSON body against a real QUERY server
- `Accept-Query`, `ETag`, `Content-Location`
- conditional revalidation with `If-None-Match` → `304`

Tests skip automatically when Ayder is not reachable. Override with `AYDER_BASE_URL` / `AYDER_TOKEN`.

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/544700fcf45f5d03e02923ac2e9009264b0f8cafa12438135253da15e5e12fbb?d=identicon)[mohamedahmed01](/maintainers/mohamedahmed01)

---

Top Contributors

[![mohamedahmed01](https://avatars.githubusercontent.com/u/47615007?v=4)](https://github.com/mohamedahmed01 "mohamedahmed01 (5 commits)")

---

Tags

httplaravelployfillquerypolyfillhttplaravelqueryrfc-10008

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mohamedahmed01-laravel-http-query-polyfill/health.svg)

```
[![Health](https://phpackages.com/badges/mohamedahmed01-laravel-http-query-polyfill/health.svg)](https://phpackages.com/packages/mohamedahmed01-laravel-http-query-polyfill)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k118.2M1.0k](/packages/laravel-socialite)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M270](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58190.1k22](/packages/api-platform-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.5k](/packages/forjedio-inertia-table)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
