Merge pull request #14 from nthdesign/patch-2

Update middleware.rst
This commit is contained in:
PJ Dietz 2015-05-30 14:51:38 -04:00
commit 375ba819ef
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ Use a middleware callable directly.
$router->add("GET,PUT,DELETE", "/widgets/{id}", function ($request, $response, $next) { $router->add("GET,PUT,DELETE", "/widgets/{id}", function ($request, $response, $next) {
$response = $response->withStatus(200) $response = $response->withStatus(200)
->withHeader("Content-type", "text/plain") ->withHeader("Content-type", "text/plain")
->withBody(new \WellRESTed\Message\Stream("It's a bunch of widgets!"); ->withBody(new \WellRESTed\Message\Stream("It's a bunch of widgets!"));
return $next($request, $response); return $next($request, $response);
}); });