protected function prepareHeaders()
    {
        // Need to let curl set the content type when posting. Our own content type
        // value would overwrite that.
        if ($this->method === HttpMethods::POST && !empty($this->headers["Content-Type"])) {
            unset($this->headers["Content-Type"]);
        }
        
        curl_setopt($this->curl, CURLOPT_USERAGENT, $this->userAgent);
        if (!empty($this->headers)) {
            $headers = $this->getHeadersBuilder()->normalize($this->headers);
            curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
        }
    }
protected function prepareHeaders()
    {
        // Need to let curl set the content type when posting. Our own content type
        // value would overwrite that.
        if ($this->method === HttpMethods::POST && !empty($this->headers["Content-Type"])) {
            unset($this->headers["Content-Type"]);
        }
        
        curl_setopt($this->curl, CURLOPT_USERAGENT, $this->userAgent);
        if (!empty($this->headers)) {
            $headers = $this->getHeadersBuilder()->normalize($this->headers);
            curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
        }
    }
protected function prepareHeaders ( ) { // Need to let curl set the content type when posting. Our own content type // value would overwrite that. if ( $ this -> method === HttpMethods :: POST && ! empty ( $ this -> headers [ "Content-Type" ] ) ) { unset ( $ this -> headers [ "Content-Type" ] ) ; } curl_setopt ( $ this -> curl , CURLOPT_USERAGENT , $ this -> userAgent ) ; if ( ! empty ( $ this -> headers ) ) { $ headers = $ this -> getHeadersBuilder ( ) -> normalize ( $ this -> headers ) ; curl_setopt ( $ this -> curl , CURLOPT_HTTPHEADER , $ headers ) ; } }
Adds the set headers to the curl request
Adds the set headers to the curl request