PHPackages                             ennacx/php-simple-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. ennacx/php-simple-curl

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

ennacx/php-simple-curl
======================

PHP - Simple cURL wrapper library.

v1.0.2(1y ago)0149MITPHPPHP ^8.2CI passing

Since Dec 26Pushed 4w ago1 watchersCompare

[ Source](https://github.com/ennacx/php-simple-curl)[ Packagist](https://packagist.org/packages/ennacx/php-simple-curl)[ Docs](https://github.com/ennacx/php-simple-curl)[ RSS](/packages/ennacx-php-simple-curl/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (14)Used By (0)

PHP Simple cURL
===============

[](#php-simple-curl)

[![PHP Version Require](https://camo.githubusercontent.com/6ae48ce6d8070e7335ef3b0037c8c8cb730342a54c7a7f6bb51e771feef34758/68747470733a2f2f706f7365722e707567782e6f72672f656e6e6163782f7068702d73696d706c652d6375726c2f726571756972652f706870)](https://packagist.org/packages/ennacx/php-simple-curl)[![Latest Stable Version](https://camo.githubusercontent.com/5ec40a929381f30774ea0999595cd9165d88dec396214c62c355564e2a3560fd/68747470733a2f2f706f7365722e707567782e6f72672f656e6e6163782f7068702d73696d706c652d6375726c2f76)](https://packagist.org/packages/ennacx/php-simple-curl)[![Total Downloads](https://camo.githubusercontent.com/3e7bd227ae3c6ecb58f1a4c3e8ed52c2d93b1dedd7e582c31da40b4f75daa35b/68747470733a2f2f706f7365722e707567782e6f72672f656e6e6163782f7068702d73696d706c652d6375726c2f646f776e6c6f616473)](https://packagist.org/packages/ennacx/php-simple-curl)[![Latest Unstable Version](https://camo.githubusercontent.com/0bb3815d5792b210576b9d030d7269fb977eec0ebcf1ff5cd6b368ff1e82309e/68747470733a2f2f706f7365722e707567782e6f72672f656e6e6163782f7068702d73696d706c652d6375726c2f762f756e737461626c65)](https://packagist.org/packages/ennacx/php-simple-curl)[![License](https://camo.githubusercontent.com/b14980dcdfe94050691da00f8ce2ec52f86b34cd9d420aba670a24d2ad21db13/68747470733a2f2f706f7365722e707567782e6f72672f656e6e6163782f7068702d73696d706c652d6375726c2f6c6963656e7365)](https://packagist.org/packages/ennacx/php-simple-curl)

A small PHP 8.2+ cURL wrapper that builds typed request objects, executes them through single or multi clients, and returns response objects.

Philosophy
----------

[](#philosophy)

PHP's cURL extension is powerful, but its option-based API can become hard to read as requests grow. Additionally, the sheer number of granular cURL constants provided by PHP makes it challenging to select the most appropriate ones.

PHP Simple cURL keeps the core pieces explicit:

- `Request` describes what to send.
- `CurlOptions` describes how to send it.
- Clients execute requests and return typed `Response` objects.

The library favors small value objects, immutable options, and predictable response helpers over a large fluent client with hidden state.

Requirements
------------

[](#requirements)

- PHP 8.2 or later
- `ext-curl`
- `ext-openssl`
- Composer 2.x

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

[](#installation)

```
composer require ennacx/php-simple-curl:^2.0@beta
```

Core Flow
---------

[](#core-flow)

1. Create a `Request` with the HTTP method, URL, and request headers.
2. Create `CurlOptions` for timeout, SSL, proxy, auth, redirect, and response capture settings.
3. Pass the request to `SingleClient::send()` or `MultiClient::sendAll()` with `Request::withOptions()` or `Request::asConfigured()`.
4. Read the returned `Response` object.

Single Request
--------------

[](#single-request)

```
