*/ interface RequestInterface { const METHOD_OPTIONS = 'OPTIONS'; const METHOD_GET = 'GET'; const METHOD_HEAD = 'HEAD'; const METHOD_POST = 'POST'; const METHOD_PUT = 'PUT'; const METHOD_DELETE = 'DELETE'; const METHOD_PATCH = 'PATCH'; const REQUEST_TYPE_DEFAULT = 'default'; const REQUEST_TYPE_CAPTURE = 'capture'; /** * Get request type * * @access public * @return string */ public function getType(); /** * Set request method * * @access public * @param string $method */ public function setMethod($method); /** * Get request method * * @access public * @return string */ public function getMethod(); /** * Set timeout period * * @access public * @param int $timeout */ public function setTimeout($timeout); /** * Get timeout period * * @access public * @return int */ public function getTimeout(); /** * Set page load delay time. * * @access public * @param int $delay */ public function setDelay($delay); /** * Get page load delay time. * * @access public * @return int */ public function getDelay(); /** * Set viewport size. * * @access public * @param int $width * @param int $height * @return void */ public function setViewportSize($width, $height); /** * Get viewport width. * * @access public * @return int */ public function getViewportWidth(); /** * Get viewport height. * * @access public * @return int */ public function getViewportHeight(); /** * Set request URL * * @access public * @param string $url */ public function setUrl($url); /** * Get request URL * * @access public * @return string */ public function getUrl(); /** * Get content body * * @access public * @return string */ public function getBody(); /** * Set request data * * @access public * @param array $data */ public function setRequestData(array $data); /** * Get request data * * @access public * @param boolean $flat * @return array */ public function getRequestData($flat = true); /** * Set headers * * @access public * @param array $headers */ public function setHeaders(array $headers); /** * Add single header * * @access public * @param string $header * @param string $value */ public function addHeader($header, $value); /** * Merge headers with existing * * @access public * @param array $headers */ public function addHeaders(array $headers); /** * Get request headers * * @access public * @param string $format * @return array */ public function getHeaders($format = 'default'); }