Skip to content

Commit ff48fa4

Browse files
committed
add protected getRequestLogContent()
1 parent 11205cb commit ff48fa4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/BaseClient.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,16 @@ public function sendHttpRequest(): self {
143143
public function requestSent(): bool {
144144
return $this->request_sent;
145145
}
146+
protected function getRequestLogContent(): string {
147+
return $this->client->__toString();
148+
}
146149
protected function recv(): \Swlib\Saber\Response {
147150
if (! $this->request_sent) {
148151
throw new \Exception('Request not sent');
149152
}
150153
$client = $this->client;
151154
$log_string = date('[Y-m-d H:i:s] ', $this->send_time) . "----------Request----------\n";
152-
$log_string .= $client->__toString() . "\n";
155+
$log_string .= $this->getRequestLogContent() . "\n";
153156
try {
154157
$response = $client->recv();
155158
$code = $response->statusCode;

0 commit comments

Comments
 (0)