davidhirtz/yii2-curl

This package is abandoned and no longer maintained. The author suggests using the guzzlehttp/guzzle package instead.

cURL extension with RESTful support for Yii2

Installs: 206

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 100

Type:yii2-extension

1.0.7 2015-12-21 12:24 UTC

This package is auto-updated.

Last update: 2022-05-25 10:22:58 UTC


README

cURL extension for Yii2 based on Nils Gajsek's curl extension, including RESTful support:

  • POST
  • GET
  • HEAD
  • PUT
  • DELETE

Requirements

  • Yii2
  • PHP 5.4+
  • Curl and php-curl installed

Installation

The preferred way to install this extension is through composer.

php composer.phar require --prefer-dist davidhirtz/yii2-curl "*"

Usage

Once the extension is installed, simply use it in your code. The following example shows you how to handling a simple GET Request.

$curl=new Curl;
$response = $curl->get('http://example.com/');