From 70f356586132604fe42d7d4cc22bcaf29c672fc4 Mon Sep 17 00:00:00 2001 From: Alban Date: Thu, 24 Aug 2017 09:52:00 +0200 Subject: [PATCH] [HTTPD] add request info on response labels --- src/Rxnet/Httpd/Httpd.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Rxnet/Httpd/Httpd.php b/src/Rxnet/Httpd/Httpd.php index 8df3470..44b093c 100644 --- a/src/Rxnet/Httpd/Httpd.php +++ b/src/Rxnet/Httpd/Httpd.php @@ -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); }); }