We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bf352f commit 6567994Copy full SHA for 6567994
1 file changed
src/Http/Client.php
@@ -60,17 +60,18 @@ public function __construct($dsn)
60
* {@inheritdoc}
61
*/
62
public function sendCommand(CommandInterface $command)
63
- {
64
- $request = clone $this->request;
65
-
66
- $request->getBody()->write(json_encode(
+ {
+ $body = new \Zend\Diactoros\Stream('php://temp', 'w+');
+ $body->write(json_encode(
67
array(
68
'method' => $command->getMethod(),
69
'params' => $command->getParameters(),
70
'id' => $command->getId(),
71
)
72
));
73
+ $request = $this->request->withBody($body);
74
+
75
/** @var \Psr\Http\Message\ResponseInterface */
76
$this->response = $this->driver->execute($request);
77
0 commit comments