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/UDPServer.php 1 location
|
@@ 52-58 (lines=7) @@
|
| 49 |
|
{ |
| 50 |
|
$data = Json::decode($data); |
| 51 |
|
$request = new ServerRequest($data['method'], $data['path']); |
| 52 |
|
if (isset($data['args'])) { |
| 53 |
|
if ('GET' === $request->getMethod()) { |
| 54 |
|
$request->withQueryParams($data['args']); |
| 55 |
|
} else { |
| 56 |
|
$request->withParsedBody($data['args']); |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
try { |
| 60 |
|
$response = app()->handleRequest($request); |
| 61 |
|
} 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) { |