src/Servitization/Server/TCPServer.php 1 location
|
@@ 42-48 (lines=7) @@
|
| 39 |
|
} |
| 40 |
|
$data = Json::decode($data); |
| 41 |
|
$request = new ServerRequest($data['method'], $data['path']); |
| 42 |
|
if (isset($data['args'])) { |
| 43 |
|
if ('GET' === $request->getMethod()) { |
| 44 |
|
$request->withQueryParams($data['args']); |
| 45 |
|
} else { |
| 46 |
|
$request->withParsedBody($data['args']); |
| 47 |
|
} |
| 48 |
|
} |
| 49 |
|
try { |
| 50 |
|
$response = app()->handleRequest($request); |
| 51 |
|
} catch (\Exception $e) { |
src/Servitization/Server/WebSocketServer.php 1 location
|
@@ 37-43 (lines=7) @@
|
| 34 |
|
$data = $frame->data; |
| 35 |
|
$data = Json::decode($data); |
| 36 |
|
$request = new ServerRequest($data['method'], $data['path']); |
| 37 |
|
if (isset($data['args'])) { |
| 38 |
|
if ('GET' === $request->getMethod()) { |
| 39 |
|
$request->withQueryParams($data['args']); |
| 40 |
|
} else { |
| 41 |
|
$request->withParsedBody($data['args']); |
| 42 |
|
} |
| 43 |
|
} |
| 44 |
|
try { |
| 45 |
|
$response = app()->handleRequest($request); |
| 46 |
|
} catch (\Exception $e) { |
src/Servitization/Server/UDPServer.php 1 location
|
@@ 36-42 (lines=7) @@
|
| 33 |
|
{ |
| 34 |
|
$data = Json::decode($data); |
| 35 |
|
$request = new ServerRequest($data['method'], $data['path']); |
| 36 |
|
if (isset($data['args'])) { |
| 37 |
|
if ('GET' === $request->getMethod()) { |
| 38 |
|
$request->withQueryParams($data['args']); |
| 39 |
|
} else { |
| 40 |
|
$request->withParsedBody($data['args']); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
try { |
| 44 |
|
$response = app()->handleRequest($request); |
| 45 |
|
} catch (\Exception $e) { |