for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Commercetools\Core\Request;
use Psr\Http\Message\ResponseInterface;
use Commercetools\Core\Client;
use Commercetools\Core\Client\HttpMethod;
use Commercetools\Core\Client\HttpRequest;
use Commercetools\Core\Client\JsonEndpoint;
use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Response\ResourceResponse;
/**
* @package Commercetools\Core\Request
* @method ResourceResponse executeWithClient(Client $client)
*/
abstract class AbstractHeadRequest extends AbstractApiRequest
{
use QueryTrait;
* @param JsonEndpoint $endpoint
* @param Context $context
public function __construct(JsonEndpoint $endpoint, Context $context = null)
parent::__construct($endpoint, $context);
}
* @return string
* @internal
protected function getPath()
return (string)$this->getEndpoint() . $this->getParamString();
* @return HttpRequest
public function httpRequest()
return new HttpRequest(HttpMethod::HEAD, $this->getPath());
* @param ResponseInterface $response
* @return ResourceResponse
public function buildResponse(ResponseInterface $response)
return new ResourceResponse($response, $this, $this->getContext());