PHPackages                             lowem/easy-curl - 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. lowem/easy-curl

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

lowem/easy-curl
===============

Allow you to make requests to API end points easily

v5.0.1(4y ago)0621MITPHP

Since Jul 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Lowe-Man/easy-curl)[ Packagist](https://packagist.org/packages/lowem/easy-curl)[ RSS](/packages/lowem-easy-curl/feed)WikiDiscussions main Synced 4d ago

READMEChangelogDependencies (1)Versions (15)Used By (1)

### Easy Curl

[](#easy-curl)

![Status](https://camo.githubusercontent.com/f55bd03e6c71b3bcc9d66a3ce1dd9c6382bac70bad08d0e1e05b879921718d62/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d737563636573732e7376673f7374796c653d666c61742d737175617265)[![GitHub issues](https://camo.githubusercontent.com/19badeeeeeba41612a0d44c1c297adce59d37fb32d45d8609908d1b4e7e7db2a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4c6f77652d4d616e2f656173792d6375726c3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/19badeeeeeba41612a0d44c1c297adce59d37fb32d45d8609908d1b4e7e7db2a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4c6f77652d4d616e2f656173792d6375726c3f7374796c653d666c61742d737175617265)[![GitHub pull requests](https://camo.githubusercontent.com/692ee19225728e62a635338a95152cb8ea90df20ff48d31ddb6309ede7b2df36/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f4c6f77652d4d616e2f656173792d6375726c3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/692ee19225728e62a635338a95152cb8ea90df20ff48d31ddb6309ede7b2df36/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f4c6f77652d4d616e2f656173792d6375726c3f7374796c653d666c61742d737175617265)[![GitHub](https://camo.githubusercontent.com/04945b08c84ad5e39e481d7dce79fcfb96bb8273ab39998d740b9dd680b153d9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c6f77652d4d616e2f656173792d6375726c3f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/04945b08c84ad5e39e481d7dce79fcfb96bb8273ab39998d740b9dd680b153d9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c6f77652d4d616e2f656173792d6375726c3f636f6c6f723d626c7565267374796c653d666c61742d737175617265)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/7cfcb7e2088669d44a73b45cc1db7827744bf726337bcff56126e1b878b4a5db/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f4c6f77652d4d616e2f656173792d6375726c3f6c6162656c3d72656c65617365267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7cfcb7e2088669d44a73b45cc1db7827744bf726337bcff56126e1b878b4a5db/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f4c6f77652d4d616e2f656173792d6375726c3f6c6162656c3d72656c65617365267374796c653d666c61742d737175617265)

---

 This is a PHP wrapper for cURL

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

[](#-table-of-contents)

- [About](#about)
    - [Changelog](CHANGELOG.md)
- [Getting Started](#getting_started)
- [API Usage](#api_usage)
- [Authors](#authors)

🧐 About
-----------------------------------------

[](#-about-)

---

This project was created to help developers easily interact with the underlying cURL API.

🏁 Getting Started
-------------------------------------------------------------

[](#-getting-started-)

---

These instructions will get you a copy of Easy Curl up and running.

### Prerequisites

[](#prerequisites)

In order to install this package you have to install `composer` which can be done by following the steps based on your system [here](https://getcomposer.org/doc/00-intro.md).

If you have not done so already run `composer init` in the root of your project directory, do so now to start using composer. Just follow the prompts as they appear.

### Installing

[](#installing)

To install Easy Curl run the command below while in your project root.

```
composer require lowem/easy-curl
```

Create a new PHP file and add the code below to the top of the file to automatically load in the package as well as any others you may have installed. The `use` statement prevents you from having to type in the full namespace of the package.

```
require_once "vendor/autoload.php";
use Lowem\EasyCurl\EasyCurl;
```

🎈 API Usage
-------------------------------------------------

[](#-api-usage-)

### GET Request `get(header)`

[](#get-request-getheader)

- `header`: This is an array of [HTTP header fields](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)
    - **Example**: ```
        [
          "Content-Type: application/json",
          "Accept: application/json"
        ]
        ```

    #### Example Usage:

    [](#example-usage)

    ```
    $test = new EasyCurl("https://jsonplaceholder.typicode.com/posts");
    try {
      $test->get();
    } catch (HTTPRequestException $e) {
      echo $e->getCustomMessage();
    }
    print_r($test->getExecMessage());

    $test->close();
    ```

### POST Request `post(postFields, header)`

[](#post-request-postpostfields-header)

- `postFields`: This is the data that you want to send to the API. It can be JSON, XML, an array with key value pairs, etc.
    - **Example**: ```
        [
          "title" => "foo",
          "body" => "bar",
          "userId" => 1
        ]
        ```
- `header`: This is an array of [HTTP header fields](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)
    - **Example**: ```
        [
          "Content-Type: application/json",
          "Accept: application/json"
        ]
        ```

    #### Example Usage:

    [](#example-usage-1)

    ```
    $test = new EasyCurl("https://jsonplaceholder.typicode.com/posts");
    try {
      $data = [
        "title" => "foo",
        "body" => "bar",
        "userId" => 1
      ];
      $test->post(json_encode($data), [
        "Content-type: application/json; charset=UTF-8",
      ]);
    } catch (HTTPRequestException $e) {
      echo $e->getCustomMessage();
    }
    print_r($test->getExecMessage());

    $test->close();
    ```

### PUT Request `put(postFields, header)`

[](#put-request-putpostfields-header)

- `postFields`: This is the data that you want to send to the API. It can be JSON, XML, an array with key value pairs, etc.
    - **Example**: ```
        [
          "id" => 1,
          "title" => "foo",
          "body" => "bar",
          "userId" => 1
        ]
        ```
- `header`: This is an array of [HTTP header fields](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)
    - **Example**: ```
        [
          "Content-Type: application/json",
          "Accept: application/json"
        ]
        ```

    #### Example Usage:

    [](#example-usage-2)

    ```
    $test = new EasyCurl("https://jsonplaceholder.typicode.com/posts/1");
    try {
      $data = [
        "id" => 1,
        "title" => "foo",
        "body" => "bar",
        "userId" => 1
      ];
      $test->put(json_encode($data), [
        "Content-type: application/json; charset=UTF-8",
      ]);
    } catch (HTTPRequestException $e) {
      echo $e->getCustomMessage();
    }
    print_r($test->getExecMessage());

    $test->close();
    ```

### DELETE Request `delete()`

[](#delete-request-delete)

#### Example Usage:

[](#example-usage-3)

```
$test = new EasyCurl("https://jsonplaceholder.typicode.com/posts/1");
try {
  $test->delete();
} catch (HTTPRequestException $e) {
  echo $e->getCustomMessage();
}
print_r($test->getExecMessage());

$test->close();
```

✍️ Authors
----------------------------------------------

[](#️-authors-)

- [@Lowe-Man](https://github.com/Lowe-Man) - Idea &amp; Initial work

See also the list of [contributors](https://github.com/Lowe-Man/easy-curl/contributors) who participated in this project.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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 ~2 days

Total

14

Last Release

1721d ago

Major Versions

v0.3.0 → v1.0.02021-08-03

v1.0.0 → v2.0.02021-08-07

v2.1.0 → v3.0.02021-08-07

v3.2.0 → v4.0.02021-08-25

v4.0.0 → v5.0.02021-08-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/94fcbe1fd36a946be8e4274ddda2bfcae0a19d66e0bbc584cf804b78315e06fb?d=identicon)[Lowe-Man](/maintainers/Lowe-Man)

---

Top Contributors

[![AlexsLaboratory](https://avatars.githubusercontent.com/u/12134329?v=4)](https://github.com/AlexsLaboratory "AlexsLaboratory (40 commits)")

---

Tags

httpcurlipv6socketsfsockopen

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lowem-easy-curl/health.svg)

```
[![Health](https://phpackages.com/badges/lowem-easy-curl/health.svg)](https://phpackages.com/packages/lowem-easy-curl)
```

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M258](/packages/rmccue-requests)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[mashape/unirest-php

Unirest PHP

1.3k9.7M161](/packages/mashape-unirest-php)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

83510.1M71](/packages/smi2-phpclickhouse)[pear/http_request2

Provides an easy way to perform HTTP requests.

764.2M48](/packages/pear-http-request2)

PHPackages © 2026

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