yii\httpclient\Client::createRequestLogToken PHP Method

createRequestLogToken() public method

This method should be used by transports during request sending logging.
public createRequestLogToken ( string $method, string $url, array $headers, string $content ) : string
$method string request method name.
$url string request URL.
$headers array request headers.
$content string request content.
return string log token.
    public function createRequestLogToken($method, $url, $headers, $content)
    {
        $token = strtoupper($method) . ' ' . $url;
        if (!empty($headers)) {
            $token .= "\n" . implode("\n", $headers);
        }
        if ($content !== null) {
            $token .= "\n\n" . StringHelper::truncate($content, $this->contentLoggingMaxSize);
        }
        return $token;
    }