netflex / http
Netflex HTTP library
v7.0.1
2026-06-03 14:22 UTC
Requires
- php: ^8.4
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^13.0
Requires (Dev)
- illuminate/container: ^13.0
This package is auto-updated.
Last update: 2026-06-03 15:49:13 UTC
README
[READ ONLY] Subtree split of the Netflex Http component (see netflex/framework)
This library provides a standalone Http client.
Installation
composer require netflex/http
Usage
<?php use Netflex\Http\Client; $client = new Client(); $post = $client->get('https://jsonplaceholder.typicode.com/posts/1'); echo $post->title;
The default for the client is to automatically parse the content based on it's content type.
If the content type is application/json, it will be parsed as an object. If you need the response as a associative array instead, all the http methods on the client takes an optional last boolean argument that enables this.
$post = $client->get('https://jsonplaceholder.typicode.com/posts/1', true); echo $post['title'];
Laravel service provider and facade
If installed through Laravel, you can use the Facade. The service provider will auto register.
<?php use Netflex\Http\Facades\Http; $post = Http::get('https://jsonplaceholder.typicode.com/posts/1'); echo $post->title;
You can optionally use the alias:
<?php use Http; $post = Http::get('https://jsonplaceholder.typicode.com/posts/1'); echo $post->title;