PHPackages                             hilalahmad/http-client - 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. hilalahmad/http-client

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

hilalahmad/http-client
======================

The HttpClient PHP package is a package designed for making HTTP requests using cURL. This package simplifies the process of sending GET, POST, PUT, PATCH, and DELETE requests, along with the ability to set custom headers, to external APIs or web services.

1.0.0(2y ago)15MITPHPPHP ^8.0

Since Nov 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fullstack124/http-client)[ Packagist](https://packagist.org/packages/hilalahmad/http-client)[ RSS](/packages/hilalahmad-http-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

HttpClient PHP Package
======================

[](#httpclient-php-package)

 *A PHP package for make a request in easy way.*

 [ ![GitHub issues](https://camo.githubusercontent.com/c55ed8c3ed243c9241f323f2dcb31c94acb6e41b474bade542c783ea950f25ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f66756c6c737461636b3132342f687474702d636c69656e74) ](https://github.com/fullstack124/http-client/issues) [ ![GitHub stars](https://camo.githubusercontent.com/4e64744f8b90af6dbbc3256fa9db3d826fe9b59ea060acf8e158b4018ad601fa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f66756c6c737461636b3132342f687474702d636c69656e74) ](https://github.com/fullstack124/http-client/stargazers) [ ![Total Downloads](https://camo.githubusercontent.com/d82a5d669f2a6ba4c3e14b342344f3f83010c5b760618ca09cc9a2de26151a5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66756c6c737461636b3132342f687474702d636c69656e74) ](https://packagist.org/packages/fullstack124/http-client) [ ![License](https://camo.githubusercontent.com/a225bc78b616ec582286a3dabf700b18e270614086a2342f6bdd535bb927283d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66756c6c737461636b3132342f687474702d636c69656e74) ](https://github.com/fullstack124/http-client/blob/main/LICENSE)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Features](#features)
- [Usage](#usage)
    - [Basic Usage](#basic-usage)
    - [Request Types](#request-types)
        - [get](#get)
        - [post](#post)
        - [patch](#patch)
        - [put](#put)
        - [delete](#delete)
- [Contribution](#contribution)
- [License](#license)

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

[](#installation)

You can install this package using Composer, a popular PHP package manager:

```
composer require hilalahmad/http-client
```

Features
--------

[](#features)

- Send GET, POST, PUT, PATCH, and DELETE requests.
- Customize and set headers for your HTTP requests.
- Process JSON responses with built-in methods.
- Handle cURL errors and HTTP request errors gracefully.

Basic Usage
-----------

[](#basic-usage)

Here's an example of how to use the HttpClient package to send a GET request:

```
use Hilalahmad\HttpClient\HttpClient;

$url="url of api";

$headers=[
    'Authorization: Bearer your-token', // depend on you
    'Content-Type: application/json',
]
$response = HttpClient::get($url, $headers);

$datas = HttpClient::getResponse($response);

foreach($datas as $data){
    echo $data->id;
}
```

Request Types
-------------

[](#request-types)

### GET

[](#get)

Here's an example of how to use the HttpClient package to send a GET request:

```
$response = HttpClient::get($url, $headers);

$datas = HttpClient::getResponse($response);

foreach($datas as $data){
    echo $data->id;
}
```

### POST

[](#post)

Here's an example of how to use the HttpClient package to send a POST request:

```
$data=[
    'value1'=>'1',
    'value2'=>'2'
];
$response = HttpClient::post($url,$data, $headers);

$datas = HttpClient::getResponse($response);

print_r($datas);
```

### PATCH

[](#patch)

Here's an example of how to use the HttpClient package to send a PATCH request:

```
$data=[
    'value1'=>'1',
    'value2'=>'2'
];
$response = HttpClient::patch($url,$data, $headers);

$datas = HttpClient::getResponse($response);

print_r($datas);
```

### PUT

[](#put)

Here's an example of how to use the HttpClient package to send a PUT request:

```
$data=[
    'value1'=>'1',
    'value2'=>'2'
];
$response = HttpClient::put($url,$data, $headers);

$datas = HttpClient::getResponse($response);

print_r($datas);
```

### DELETE

[](#delete)

Here's an example of how to use the HttpClient package to send a PUT request:

```
$response = HttpClient::delete($url, $headers);

$datas = HttpClient::getResponse($response);

print_r($datas);
```

Contribution
------------

[](#contribution)

If you'd like to contribute to this package or report issues, please check the [ Github repo](https://github.com/fullstack124/http-client/issues) for more details.

License
-------

[](#license)

This package is open-source and is licensed under the MIT License.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

915d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8130aa2a0353184f190feb106a6c11f57afa8872ec9e15e75b782d9e03dc5bde?d=identicon)[hilal ahmad](/maintainers/hilal%20ahmad)

---

Top Contributors

[![hilalahmad0101](https://avatars.githubusercontent.com/u/115874624?v=4)](https://github.com/hilalahmad0101 "hilalahmad0101 (1 commits)")

---

Tags

httpclientcurlclientrestfulapiPHPrequestsCustom headers

### Embed Badge

![Health badge](/badges/hilalahmad-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/hilalahmad-http-client/health.svg)](https://phpackages.com/packages/hilalahmad-http-client)
```

###  Alternatives

[illuminate/http

The Illuminate Http package.

11936.0M5.0k](/packages/illuminate-http)

PHPackages © 2026

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