src/Request.php
private function addRequestHeaders(&$curlOptions) {
        // cURL HTTP headers
        $headers = $this->getOption(self::HEADERS_KEY, array());
        // Turn off the Expect header to stop HTTP 100 Continue responses.
        // Response parsing was not handling these headers.
        $curlOptions[CURLOPT_HTTPHEADER][] = "Expect:";
        if (0 < count($headers)) {
            $curlOptions[CURLOPT_HTTPHEADER] = array();
            foreach ($headers as $key => $value) {
                $curlOptions[CURLOPT_HTTPHEADER][] = sprintf("%s:%s", $key, $value);
            }
        }
    }
private function addRequestHeaders(&$curlOptions) {
        // cURL HTTP headers
        $headers = $this->getOption(self::HEADERS_KEY, array());
        // Turn off the Expect header to stop HTTP 100 Continue responses.
        // Response parsing was not handling these headers.
        $curlOptions[CURLOPT_HTTPHEADER][] = "Expect:";
        if (0 < count($headers)) {
            $curlOptions[CURLOPT_HTTPHEADER] = array();
            foreach ($headers as $key => $value) {
                $curlOptions[CURLOPT_HTTPHEADER][] = sprintf("%s:%s", $key, $value);
            }
        }
    }
private function addRequestHeaders ( & $ curlOptions ) { // cURL HTTP headers $ headers = $ this -> getOption ( self :: HEADERS_KEY , array ( ) ) ; // Turn off the Expect header to stop HTTP 100 Continue responses. // Response parsing was not handling these headers. $ curlOptions [ CURLOPT_HTTPHEADER ] [ ] = "Expect:" ; if ( 0 < count ( $ headers ) ) { $ curlOptions [ CURLOPT_HTTPHEADER ] = array ( ) ; foreach ( $ headers as $ key => $ value ) { $ curlOptions [ CURLOPT_HTTPHEADER ] [ ] = sprintf ( "%s:%s" , $ key , $ value ) ; } } }
Add headers to curl options

@param array &$curlOptions
Add headers to curl options