eZ\Publish\Core\REST\Client\HttpClient\Authentication\IntegrationTestAuthenticator::request PHP Method

request() public method

Returns the result from the remote server. The client sets the correct headers for Basic Auth into the $message transmitted to the inner client.
public request ( string $method, string $path, Message $message = null ) : Message
$method string
$path string
$message eZ\Publish\Core\REST\Common\Message
return eZ\Publish\Core\REST\Common\Message
    public function request($method, $path, Message $message = null)
    {
        $message = $message ?: new Message();
        $message->headers['X-Test-User'] = $this->userId;
        if ($this->sessionId !== null && !isset($message->headers['X-Test-Session'])) {
            $message->headers['X-Test-Session'] = $this->sessionId;
        }
        return $this->innerClient->request($method, $path, $message);
    }