diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b9fcfb..6d914b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## 0.5.0 (2017-05-22) + +* Feature / BC break: Replace `Factory` with simple `Client` constructor + (#85 by @clue) + + The `Client` now accepts a required `LoopInterface` and an optional + `ConnectorInterface`. It will now create a default `Connector` if none + has been given. + + ```php + // old + $dnsResolverFactory = new React\Dns\Resolver\Factory(); + $dnsResolver = $dnsResolverFactory->createCached('8.8.8.8', $loop); + $factory = new React\HttpClient\Factory(); + $client = $factory->create($loop, $dnsResolver); + + // new + $client = new React\HttpClient\Client($loop); + ``` + +* Feature: `Request::close()` now cancels pending connection attempt + (#91 by @clue) + +* Feature / BC break: Replace deprecated SocketClient with new Socket component + (#74, #84 and #88 by @clue) + +* Feature / BC break: Consistent stream semantics and forward compatibility with upcoming Stream v1.0 + (#90 by @clue) + +* Feature: Forward compatibility with upcoming EventLoop v1.0 and v0.5 + (#89 by @clue) + +* Fix: Catch Guzzle parser exception + (#82 by @djagya) + ## 0.4.17 (2017-03-20) * Improvement: Add PHPUnit to require-dev #75 @jsor diff --git a/README.md b/README.md index 703e9dd..1a01df7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,15 @@ [![Build Status](https://secure.travis-ci.org/reactphp/http-client.png?branch=master)](http://travis-ci.org/reactphp/http-client) [![Code Climate](https://codeclimate.com/github/reactphp/http-client/badges/gpa.svg)](https://codeclimate.com/github/reactphp/http-client) -Basic HTTP/1.0 client. +Event-driven, streaming HTTP client for [ReactPHP](http://reactphp.org) + +**Table of Contents** + +* [Basic usage](#basic-usage) + * [Example](#example) +* [Install](#install) +* [Tests](#tests) +* [License](#license) ## Basic usage @@ -70,11 +78,18 @@ $loop->run(); See also the [examples](examples). -## TODO +## Install + +The recommended way to install this library is [through Composer](http://getcomposer.org). +[New to Composer?](http://getcomposer.org/doc/00-intro.md) -* gzip content encoding -* keep-alive connections -* following redirections +This will install the latest supported version: + +```bash +$ composer require react/http-client:^0.5 +``` + +More details about version upgrades can be found in the [CHANGELOG](CHANGELOG.md). ## Tests @@ -90,3 +105,7 @@ To run the test suite, go to the project root and run: ```bash $ php vendor/bin/phpunit ``` + +## License + +MIT, see [LICENSE file](LICENSE). diff --git a/composer.json b/composer.json index 929e563..d9751db 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "react/http-client", - "description": "Asynchronous HTTP client library.", + "description": "Event-driven, streaming HTTP client for ReactPHP", "keywords": ["http"], "license": "MIT", "require": {