private function do_request($verb, $path,  $data = Array(), $timeout = 10)
    {
        return $this->use_sockets ? $this->do_request_with_sockets($verb, $path, $data, $timeout) : $this->do_request_with_curl($verb, $path, $data, $timeout );
    }
private function do_request($verb, $path,  $data = Array(), $timeout = 10)
    {
        return $this->use_sockets ? $this->do_request_with_sockets($verb, $path, $data, $timeout) : $this->do_request_with_curl($verb, $path, $data, $timeout );
    }
private function do_request ( $ verb , $ path , $ data = Array ( ) , $ timeout = 10 ) { return $ this -> use_sockets ? $ this -> do_request_with_sockets ( $ verb , $ path , $ data , $ timeout ) : $ this -> do_request_with_curl ( $ verb , $ path , $ data , $ timeout ) ; }
Do actual HTTP requests in here, absctract from the rest of phpDefensio so we can easily change
the library or technique used as of now it uses a simple sockets implementation, and might throw
an exception if no socket can be open
Do actual HTTP requests in here absctract from the rest of phpDefensio so we can easily change the library or technique used as of now it uses a simple sockets implementation and might throw an exception if no socket can be open