Skip to content

Commit

Permalink
Prepare v0.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Feb 16, 2017
1 parent 604bf0a commit 3f4821c
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 16 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog

## 0.5.0 (2017-02-16)

* Feature / BC break: Change `Request` methods to be in line with PSR-7
(#117 by @clue)
* Rename `getQuery()` to `getQueryParams()`
* Rename `getHttpVersion()` to `getProtocolVersion()`
* Change `getHeaders()` to always return an array of string values
for each header

* Feature / BC break: Update Socket component to v0.5 and
add secure HTTPS server support
(#90 and #119 by @clue)

```php
// old plaintext HTTP server
$socket = new React\Socket\Server($loop);
$socket->listen(8080, '127.0.0.1');
$http = new React\Http\Server($socket);

// new plaintext HTTP server
$socket = new React\Socket\Server('127.0.0.1:8080', $loop);
$http = new React\Http\Server($socket);

// new secure HTTPS server
$socket = new React\Socket\Server('127.0.0.1:8080', $loop);
$socket = new React\Socket\SecureServer($socket, $loop, array(
'local_cert' => __DIR__ . '/localhost.pem'
));
$http = new React\Http\Server($socket);
```

* BC break: Mark internal APIs as internal or private and
remove unneeded `ServerInterface`
(#118 by @clue, #95 by @legionth)

## 0.4.4 (2017-02-13)

* Feature: Add request header accessors (à la PSR-7)
Expand Down
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,30 @@

[![Build Status](https://secure.travis-ci.org/reactphp/http.png?branch=master)](http://travis-ci.org/reactphp/http) [![Code Climate](https://codeclimate.com/github/reactphp/http/badges/gpa.svg)](https://codeclimate.com/github/reactphp/http)

Library for building an evented http server.

This component builds on top of the `Socket` component to implement HTTP. Here
are the main concepts:

* **Server**: Attaches itself to an instance of
`React\Socket\ServerInterface`, parses any incoming data as HTTP, emits a
`request` event for each request.
* **Request**: A `ReadableStream` which streams the request body and contains
meta data which was parsed from the request header.
* **Response** A `WritableStream` which streams the response body. You can set
the status code and response headers via the `writeHead()` method.

Event-driven, streaming plaintext HTTP and secure HTTPS server for [ReactPHP](https://reactphp.org/)

**Table of Contents**

* [Quickstart example](#quickstart-example)
* [Usage](#usage)
* [Server](#server)
* [Request](#request)
* [getMethod()](#getmethod)
* [getQueryParams()](#getqueryparams]
* [getProtocolVersion()](#getprotocolversion)
* [getHeaders()](#getheaders)
* [getHeader()](#getheader)
* [getHeaderLine()](#getheaderline)
* [hasHeader()](#hasheader)
* [expectsContinue()](#expectscontinue)
* [Response](#response)
* [writeContinue()](#writecontinue)
* [writeHead()](#writehead)
* [Install](#install)
* [Tests](#tests)
* [License](#license)

> Note: This project is in beta stage! Feel free to report any issues you encounter.
## Quickstart example

Expand Down Expand Up @@ -255,7 +266,7 @@ The recommended way to install this library is [through Composer](http://getcomp
This will install the latest supported version:

```bash
$ composer require react/http:^0.4.4
$ composer require react/http:^0.5
```

More details about version upgrades can be found in the [CHANGELOG](CHANGELOG.md).
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react/http",
"description": "Library for building an evented http server.",
"keywords": ["http"],
"description": "Event-driven, streaming plaintext HTTP and secure HTTPS server for ReactPHP",
"keywords": ["event-driven", "streaming", "HTTP", "HTTPS", "server", "ReactPHP"],
"license": "MIT",
"require": {
"php": ">=5.3.0",
Expand Down

0 comments on commit 3f4821c

Please sign in to comment.