microweber-packages / microweber-http
Standalone Laravel HTTP client package with Guzzle/cURL adapters, SSL enforcement, SSRF guard and URL fetch guard
Package info
github.com/microweber-packages/microweber-http
pkg:composer/microweber-packages/microweber-http
v1.0.0
2026-11-03 11:17 UTC
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.0
- illuminate/cache: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- microweber-packages/microweber-package: *
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- microweber-packages/http: *
This package is auto-updated.
Last update: 2026-11-03 17:06:50 UTC
README
A standalone Laravel HTTP client package with Guzzle/cURL adapters, SSL enforcement, SSRF guard, and URL fetch guard.
Installation
composer require microweber-packages/microweber-http
Usage
Via Service Container
// Resolve via the container $http = app('http'); $body = $http->url('https://example.com/api')->get();
HttpClientFactory
use MicroweberPackages\Http\HttpClientFactory; // Create a Guzzle client with SSL verification $client = HttpClientFactory::guzzle(['timeout' => 30]); // Create a secure cURL handle $ch = HttpClientFactory::curl('https://example.com'); // Fetch content $content = HttpClientFactory::fetchContent('https://example.com/file.zip');
SSRF Guard
use MicroweberPackages\Http\Ssrf\SsrfGuard; if (SsrfGuard::isExternallyReachable($url)) { // Safe to fetch }
URL Fetch Guard
use MicroweberPackages\Http\UrlFetchGuard; UrlFetchGuard::assertSafe($userSuppliedUrl);
License
MIT