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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user