mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -66,7 +66,7 @@ class LoggedRequest implements \JsonSerializable
|
||||
'body' => $this->isBinary($this->rawRequest) ? 'BINARY' : $this->parsedRequest->getContent(),
|
||||
'query' => $this->parsedRequest->getQuery()->toArray(),
|
||||
'post' => $this->getPostData(),
|
||||
'curl' => '', //(new CurlFormatter())->format(parse_request($this->rawRequest)),
|
||||
'curl' => $this->getRequestAsCurl(),
|
||||
'additional_data' => $this->additionalData,
|
||||
],
|
||||
];
|
||||
@@ -208,4 +208,13 @@ class LoggedRequest implements \JsonSerializable
|
||||
{
|
||||
return $this->startTime->diffInMilliseconds($this->stopTime, false);
|
||||
}
|
||||
|
||||
protected function getRequestAsCurl(): string
|
||||
{
|
||||
try {
|
||||
return (new CurlFormatter())->format(parse_request($this->rawRequest));
|
||||
} catch (\Exception $e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class HttpConnection
|
||||
public function send($data)
|
||||
{
|
||||
$this->emit('data', [$data]);
|
||||
|
||||
$this->socket->send($data);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
"ext-json": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"bfunky/http-parser": "^2.2",
|
||||
"cboden/ratchet": "^0.4.2",
|
||||
"clue/block-react": "^1.3",
|
||||
"clue/buzz-react": "^2.7",
|
||||
|
||||
Reference in New Issue
Block a user