netflex/http
| Install | |
|---|---|
composer require netflex/http |
|
| Latest Version: | v7.0.1 |
| PHP: | ^8.4 |
| License: | MIT |
| Last Updated: | Jun 3, 2026 |
| Links: | GitHub · Packagist |
Netflex Http
[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;
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v7.0.1 | ^8.4 | ^13.0 | MIT | |
| v7.0.0 | ^8.4 | ^13.0 | MIT | |
| v6.7.3 | ^8.2 | ^12.0 | MIT | |
| v6.7.2 | ^8.2 | ^12.0 | MIT | |
| v6.7.1 | ^8.2 | ^12.0 | MIT | |
| v6.7.0 | ^8.2 | ^12.0 | MIT | |
| v6.6.0 | ^8.2 | ^12.0 | MIT | |
| v6.5.0 | ^8.2 | ^12.0 | MIT | |
| v6.4.0 | ^8.2 | ^12.0 | MIT | |
| v6.3.1 | ^8.2 | ^12.0 | MIT | |
| v6.3.0 | ^8.2 | ^12.0 | MIT | |
| v6.2.3 | ^8.2 | ^12.0 | MIT | |
| v6.2.2 | ^8.2 | ^12.0 | MIT | |
| v6.2.1 | ^8.2 | ^12.0 | MIT | |
| v6.2.0 | ^8.2 | ^12.0 | MIT | |
| v6.1.10 | ^8.2 | ^12.0 | MIT | |
| v6.1.9 | ^8.2 | ^12.0 | MIT | |
| 6.1.8 | ^8.2 | ^12.0 | MIT | |
| v6.1.7 | ^8.2 | ^12.0 | MIT | |
| v6.1.6 | ^8.2 | ^12.0 | MIT | |
| v6.1.5 | ^8.2 | ^12.0 | MIT | |
| v6.1.4 | ^8.2 | ^12.0 | MIT | |
| v6.1.3 | ^8.2 | ^12.0 | MIT | |
| v6.1.2 | ^8.2 | ^12.0 | MIT | |
| v6.1.1 | ^8.2 | ^12.0 | MIT | |
| v6.1.0 | ^8.2 | ^12.0 | MIT | |
| v6.0.7 | ^8.2 | ^12.0 | MIT | |
| v6.0.6 | ^8.2 | ^12.0 | MIT | |
| v6.0.5 | ^8.2 | ^12.0 | MIT | |
| v6.0.4 | ^8.2 | ^12.0 | MIT |
Showing the latest 30 of 293. See every release on Packagist