private function applyMethod(puzzle_message_RequestInterface $request) { $method = $request->getMethod(); if ($method == 'HEAD') { $this->_closure_handleOptions[CURLOPT_NOBODY] = true; unset($this->_closure_handleOptions[CURLOPT_WRITEFUNCTION], $this->_closure_handleOptions[CURLOPT_READFUNCTION]); } else { $this->_closure_handleOptions[CURLOPT_CUSTOMREQUEST] = $method; if (!$request->getBody()) { unset($this->_closure_handleOptions[CURLOPT_READFUNCTION]); } else { $this->applyBody($request, $this->_closure_handleOptions); } } }
/** * {@inheritdoc} */ public function getMethod() { return $this->_delegate->getMethod(); }