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

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

weblabnl/curl
=============

cURL library

1.0.6(6y ago)112.9k↓44.4%1Apache-2.0PHPCI failing

Since Apr 20Pushed 6y ago4 watchersCompare

[ Source](https://github.com/Weblab-nl/curl)[ Packagist](https://packagist.org/packages/weblabnl/curl)[ RSS](/packages/weblabnl-curl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (7)Used By (1)

WebLab B.V. - cURL Wrapper
==========================

[](#weblab-bv---curl-wrapper)

This library is build upon the cURL functionality. It's a programmer friendly way to do cURL requests and mostly to keep things readable while still allowing full control over your request.

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

[](#installation)

### Install using composer:

[](#install-using-composer)

```
composer require weblabnl/curl

```

Using the Library
-----------------

[](#using-the-library)

#### Make a POST request to a REST API

[](#make-a-post-request-to-a-rest-api)

```
$params = [
    first_name  => 'Ankie',
    last_name   => 'Visser'
];

$url = 'https://api.weblab.nl/users';

$result = Weblab\CURL\CURL::setBearer('some_access_token')
    ->post($url, $params);

if ($result->getStatus() === 201) {
    // User created
}
```

#### Make a PATCH request to a REST API (without helper functions)

[](#make-a-patch-request-to-a-rest-api-without-helper-functions)

```
$url = 'https://api.weblab.nl/users/1';

$params = [
    'ankievisser01@test.com'
];

$request = (new Weblab\CURL\Request())
    ->setOption(CURLOPT_URL, $url)
    ->setOption(CURLOPT_POSTFIELDS, http_build_query($params))
    ->setOption(CURLOPT_CUSTOMREQUEST, 'PATCH')
    ->setOption(CURLOPT_POST, true)
$result = $request->run();

if ($result->getStatus() === 200) {
    // user successfully saved
}
```

#### Make a GET request (Content-Type: application/json are automatically decoded)

[](#make-a-get-request-content-type-applicationjson-are-automatically-decoded)

```
$result = Weblab\CURL\CURL::get('https://api.weblab.nl/users', ['limit' => '1']);

/**
 * cURL result body:
 * {
 *     data: [
 *         {
 *             id           : 1 ,
 *             first_name   : "Ankie",
 *             last_name    : "Visser"
 *         }
 *     ]
 * }
 */

if ($result->getStatus() === 200) {
    foreach ($result->getResults()->data as $user) {
        // $user object
    }
}
```

#### Check if a file exists

[](#check-if-a-file-exists)

```
$result = Weblab\CURL\CURL::doesFileExist('https://www.weblab.nl/img/logo.png')
if ($result) {
    // file exists
}
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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 ~150 days

Total

5

Last Release

2350d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbf2516492b2f3b10b4ded55b1aa2d096814fad45f086c56e8c8543e3c4e9b35?d=identicon)[Shawty81](/maintainers/Shawty81)

---

Top Contributors

[![Shawty81](https://avatars.githubusercontent.com/u/8200183?v=4)](https://github.com/Shawty81 "Shawty81 (5 commits)")[![mckooiker](https://avatars.githubusercontent.com/u/19285394?v=4)](https://github.com/mckooiker "mckooiker (3 commits)")

---

Tags

composercurlphp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

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

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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