Skip to content

Commit

Permalink
[HTTPD] add request info on response labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban authored and madmatah committed Aug 24, 2017
1 parent 9bcb252 commit 70f3565
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Rxnet/Httpd/Httpd.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public function onConnection(ConnectionInterface $conn)
$request
->take(1)
->subscribeCallback(function () use ($request, $response, $labels) {
$response->labels['request_path'] = $request->getPath();
$response->labels['request_method'] = $request->getMethod();

$this->dispatch($request, $response, $labels);
});
}
Expand Down

0 comments on commit 70f3565

Please sign in to comment.