proxylib.php
protected function _generateProxyRequestHeaders($as_string = FALSE)
    {
        $headers = array();
        $headers[] = 'Content-Type: ' . $this->_requestContentType;

        if ($this->_requestAuthorization) {
            $headers[] = 'Authorization: ' . $this->_requestAuthorization;
        }

        if ($this->_requestAccept) {
            $headers[] = 'Accept: ' . $this->_requestAccept;
        }

        if($as_string)
        {
            $data = "";
            foreach($headers as $value)
                if($value)
                    $data .= "$value\n";

            $headers = $data;
        }

        return $headers;
    }
protected function _generateProxyRequestHeaders($as_string = FALSE)
    {
        $headers = array();
        $headers[] = 'Content-Type: ' . $this->_requestContentType;

        if ($this->_requestAuthorization) {
            $headers[] = 'Authorization: ' . $this->_requestAuthorization;
        }

        if ($this->_requestAccept) {
            $headers[] = 'Accept: ' . $this->_requestAccept;
        }

        if($as_string)
        {
            $data = "";
            foreach($headers as $value)
                if($value)
                    $data .= "$value\n";

            $headers = $data;
        }

        return $headers;
    }
protected function _generateProxyRequestHeaders ( $ as_string = FALSE ) { $ headers = array ( ) ; $ headers [ ] = 'Content-Type: ' . $ this -> _requestContentType ; if ( $ this -> _requestAuthorization ) { $ headers [ ] = 'Authorization: ' . $ this -> _requestAuthorization ; } if ( $ this -> _requestAccept ) { $ headers [ ] = 'Accept: ' . $ this -> _requestAccept ; } if ( $ as_string ) { $ data = "" ; foreach ( $ headers as $ value ) if ( $ value ) $ data .= "$value\n" ; $ headers = $ data ; } return $ headers ; }
Generate and return any headers needed to make the proxy request
@param  bool $as_string Whether to return the headers as a string instead
of an associative array
@return array|string
Generate and return any headers needed to make the proxy request