HTTP Client Extension for Yii 2


This extension provides the HTTP client for the Yii framework 2.0.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads Build Status

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-httpclient

or add

"yiisoft/yii2-httpclient": "~2.0.0"

to the require section of your composer.json.

Class Reference

Class Description
yii\httpclient\Client Client provide high level interface for HTTP requests execution.
yii\httpclient\CurlFormatter CURLFormatter is used with CurlTransport to format the content of the request as an array with the field name as key and field data as value
yii\httpclient\CurlTransport CurlTransport sends HTTP messages using Client URL Library (cURL)
yii\httpclient\Exception Exception represents an exception that is caused during HTTP requests.
yii\httpclient\FormatterInterface FormatterInterface represents HTTP request message formatter.
yii\httpclient\JsonFormatter JsonFormatter formats HTTP message as JSON.
yii\httpclient\JsonParser JsonParser parses HTTP message content as JSON.
yii\httpclient\Message Message represents a base HTTP message.
yii\httpclient\MockTransport
yii\httpclient\ParserInterface ParserInterface represents HTTP response message parser.
yii\httpclient\Request Request represents HTTP request.
yii\httpclient\RequestEvent RequestEvent represents the event parameter used for an request events.
yii\httpclient\Response Response represents HTTP request response.
yii\httpclient\StreamTransport StreamTransport sends HTTP messages using Streams
yii\httpclient\Transport Transport performs actual HTTP request sending.
yii\httpclient\UrlEncodedFormatter UrlEncodedFormatter formats HTTP message as 'application/x-www-form-urlencoded'.
yii\httpclient\UrlEncodedParser UrlEncodedParser parses HTTP message content as 'application/x-www-form-urlencoded'.
yii\httpclient\XmlFormatter XmlFormatter formats HTTP message as XML.
yii\httpclient\XmlParser XmlParser parses HTTP message content as XML.
yii\httpclient\debug\HttpClientPanel Debugger panel that collects and displays HTTP requests performed.
yii\httpclient\debug\RequestExecuteAction RequestExecuteAction executes HTTP request and passes its result to the browser.
yii\httpclient\debug\SearchModel Log search model.