protected function sendRequest()
    {
        $context = stream_context_create($this->request);
        $response = trim(file_get_contents($this->endpoint, FALSE, $context));
        $this->response = new Response($http_response_header, $response, $this->request);

        return $this->response;
    }
protected function sendRequest()
    {
        $context = stream_context_create($this->request);
        $response = trim(file_get_contents($this->endpoint, FALSE, $context));
        $this->response = new Response($http_response_header, $response, $this->request);

        return $this->response;
    }
protected function sendRequest ( ) { $ context = stream_context_create ( $ this -> request ) ; $ response = trim ( file_get_contents ( $ this -> endpoint , FALSE , $ context ) ) ; $ this -> response = new Response ( $ http_response_header , $ response , $ this -> request ) ; return $ this -> response ; }
Sends the actual request and returns the response.

@param array $request The stream_wraper options from wich to build the request
@return mixed
Sends the actual request and returns the response .