PHPackages                             pablosanches/owl - 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. pablosanches/owl

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

pablosanches/owl
================

Owl is a simply cURL wrapper for PHP

1.0.0(8y ago)03.9k1MITPHPPHP &gt;=5.6

Since Aug 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/pablosanches/owl)[ Packagist](https://packagist.org/packages/pablosanches/owl)[ Docs](https://github.com/pablosanches/own)[ RSS](/packages/pablosanches-owl/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

[![logo](https://camo.githubusercontent.com/a727d7115159335aa93827b50563302aab3242f44440d2000c02f8b2433cafea/687474703a2f2f692e696d6775722e636f6d2f594c35525a76352e706e67)](https://camo.githubusercontent.com/a727d7115159335aa93827b50563302aab3242f44440d2000c02f8b2433cafea/687474703a2f2f692e696d6775722e636f6d2f594c35525a76352e706e67) Owl
=================================================================================================================================================================================================================================================================================================================================================

[](#-owl)

Owl is a simply cURL wrapper for PHP

[![Build Status](https://camo.githubusercontent.com/de9e27ef3324603eb1819f34aa7eb420d57d39f8a1d3094f8927aca90c7d9021/68747470733a2f2f7472617669732d63692e6f72672f7061626c6f73616e636865732f6f776c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pablosanches/owl)[![CodeClimate](https://camo.githubusercontent.com/c8352eaa20e3d4b829358ae126673cbd762ede5fbffbcdf7050c1b94752eccfe/687474703a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f7061626c6f73616e636865732f6f776c2e7376673f7374796c653d666c6174)](https://codeclimate.com/github/pablosanches/owl)[![Version](https://camo.githubusercontent.com/28ee5029a91e5696cc49a1bdb2828646911db47e7435bfbaef7e114c7242101a/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061626c6f73616e636865732f6f776c2e7376673f7374796c653d666c6174)](https://packagist.org/packages/pablosanches/owl)

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

[](#requirements)

- PHP &gt;= 5.6
- [cURL](http://php.net/manual/fr/book.curl.php/) library enabled

Install
-------

[](#install)

### Composer

[](#composer)

```
{
    "require": {
        "pablosanches/owl": "1.0.*"
    }
}
```

```
require_once './vendor/autoload.php';
```

Usage
-----

[](#usage)

```
// Namespace shortcut
use Owl\Method as Http;

// Template
$request = new Http\( string $url [, array $options ] );
```

Methods are:

- `Get()`
- `Head()`
- `Options()`
- `Post()`
- `Put()`
- `Patch()`
- `Delete()`

### Constructor `$options`

[](#constructor-options)

```
[
    'data' => [             // Data to send, available for `Post`, `Put` and `Patch`
        'foo' => 'bar'
    ],
    'headers' => [          // Additional headers (optional)
        'Authorization: foobar'
    ],
    'ssl' => '/cacert.pem', // Use it for SSL (optional)
    'is_payload' => true,   // `true` for sending a payload (JSON-encoded data, optional)
    'autoclose' => true     // Is the request must be automatically closed (optional)
]
```

### Public methods

[](#public-methods)

```
// Send a request
$request->send();

// HTTP status code
$request->getStatus();

// HTTP header
$request->getHeader();

// HTTP body response
$request->getResponse();

// Used cURL options
$request->getCurlOptions();

// Set a cURL option
$request->setCurlOption(CURLOPT_SOMETHING, $value);

// Manually close the handle (necessary when `autoclose => false` is used)
$request->close();
```

### Examples

[](#examples)

Basic:

```
// Namespace shortcut
use Owl\Method as Http;

// Standard GET request
$request = new Http\Get('http://domain.com');

// Send this request
$request->send();

echo $request->getResponse(); // body response
echo $request->getStatus(); // HTTP status code
```

Send a payload:

```
// Namespace shortcut
use Owl\Method as Http;

// JSON-encoded POST request
$request = new Http\Post($this->endpoint, [
    'data' => [
        'name' => 'foo',
        'email' => 'foo@domain.com'
    ],
    // With 'is_payload' => true
    // You don't have to json_encode() your array of data
    // Moreover, the appropriate headers will be set for you
    'is_payload' => true
]);

// Send this request
$request->send();

echo $request->getResponse(); // body response
echo $request->getStatus(); // HTTP status code
```

Manual closing:

```
// Namespace shortcut
use Owl\Method as Http;

// Set `autoclose` option to `false`
$request = new Http\Get('http://domain.com', [
    'autoclose' => false
]);

// Send this request
$request->send();

// Now you can retrieve a cURL info as the handle is still open
$request->getCurlInfo(CURLINFO_SOMETHING);

echo $request->getResponse();

// Manually close the handle
$request->close();
```

Tests
-----

[](#tests)

On project directory:

- `composer install` to retrieve `phpunit`
- `phpunit` to run tests

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

3246d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1846624?v=4)[Pablo Sanches](/maintainers/pablosanches)[@pablosanches](https://github.com/pablosanches)

---

Top Contributors

[![pablosanches](https://avatars.githubusercontent.com/u/1846624?v=4)](https://github.com/pablosanches "pablosanches (23 commits)")

---

Tags

httpcurl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pablosanches-owl/health.svg)

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

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k37.1M278](/packages/rmccue-requests)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.7M274](/packages/nategood-httpful)[mashape/unirest-php

Unirest PHP

1.3k10.1M163](/packages/mashape-unirest-php)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48349.4M448](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84711.6M81](/packages/smi2-phpclickhouse)[pear/http_request2

Provides an easy way to perform HTTP requests.

784.3M53](/packages/pear-http-request2)

PHPackages © 2026

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