PHPackages                             quantik/curlop - 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. quantik/curlop

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

quantik/curlop
==============

A simple encapsulation for Curl that aims for simplicity.

06PHP

Since Sep 21Pushed 7y agoCompare

[ Source](https://github.com/AgenciaQuantik/CurlOP)[ Packagist](https://packagist.org/packages/quantik/curlop)[ RSS](/packages/quantik-curlop/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

CurlOP Library
==============

[](#curlop-library)

Description
===========

[](#description)

A simple encapsulation for Curl that aims for simplicity.

Features
========

[](#features)

- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
- Object oriented curl connections
- Authorization support
- Concatenation support

Requirements
============

[](#requirements)

- PHP &gt;= 7.1
- CURL Extension
- phpunit/phpunit

Installation
============

[](#installation)

`composer require Quantik/CurlOP`

Usage
=====

[](#usage)

First step is to require the namespace using `use Agencia-Quantik/CurlOP` inside your file. Now you can just create an object such as: `$var = new CurlOP('target-url');` Here are some methods you may use:

- setHeader($string) Here you can add a header parameter, don't worry about adding authentication here, since we will handle this for you. Ex: `$var->setHeader('content-type: application/json')`
- setHeaders($array = \[\]) This serves to overwrite the entire header that is going to be sent with a new array, you can populate it in the argument. Ex: `$var->setHeaders(['content-type: application/json','accept: */*'])`
- setPost($arg1, $arg2 = "") There are two ways you can add variables to the POST body, if you pass only one argument, (Ex: `$var->setPost('value')`), it will be passed as a numeric key, if you pass two arguments, (Ex: `$var->setPost('key','value')`), the first argument will serve as a key and the second one as the variable actual value.
- method($method) You can specify the method as a string or as a integer, here is the list of all the options:

    - 0 - GET
    - 1 - POST
    - 2 - PUT
    - 3 - PATCH
    - 4 - DELETE
    - 5 - COPY
    - 6 - HEAD
    - 7 - OPTIONS
    - 8 - LINK
    - 9 - UNLINK
    - 10 - PURGE
    - 11 - LOCK
    - 12 - UNLOCK
    - 13 - PROPFIND
    - 14 - VIEW (You may also use POSTMAN order list, I use it as reference)
- auth($authType) You can specify the method as a string or as a integer, here is the list of all the options:

    - 0 - None
    - 1 - Bearer
    - 2 - Basic
    - 3 - Digest (NYI)
    - 4 - OAuth1 (NYI)
    - 5 - OAuth2
    - 6 - Hawk (NYI)
    - 7 - AWS (NYI) (You may also use POSTMAN order list, I use it as reference)
- token($string) If you choose to use an authentication that requires token, you may fill it here, you don't need to insert `{{TokenType}} {{Token}}`, just the token.
- login($username, $password = "") If you choose to use an authentication that requires basic login and password, you may fill it here.
- responseType($responseType = 1) You can specify the method as a string or as a integer, here is the list of all the options:

    - 0 - None (won't parse)
    - 1 - JSON
    - 2 - XML

Credits
=======

[](#credits)

- Joel Oliveira for all the support and things that teach me
- Fernando Sousa for all the support also

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5350089?v=4)[RafaelCorrea](/maintainers/RafaelCorrea)[@RafaelCorrea](https://github.com/RafaelCorrea)

### Embed Badge

![Health badge](/badges/quantik-curlop/health.svg)

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

###  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)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

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

78126.4M414](/packages/react-http)

PHPackages © 2026

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