src/net/Curl.php
private function send ()
		{
			if (count($this->_params) > 0)
				$this->_options[ CURLOPT_URL ] .= '?' . http_build_query($this->_params);

			if (count($this->_headers) > 0)
				$this->_options[ CURLOPT_HTTPHEADER ] = $this->_headers;

			$curl = curl_init();
			curl_setopt_array($curl, $this->_options);
			$resp = curl_exec($curl);

			if ($resp === false)
			{
				$this->_response = new CurlResponse([
					'status' => CurlResponse::S_SERVERERROR,
					'body'   => 'Error #' . curl_errno($curl) . ': ' . curl_error($curl)
				]);
			}
			else
			{
				$this->_response = new CurlResponse;
				$this->_response->fromCurl($resp, $curl);
			}

			curl_close($curl);

			return $this->_response;
		}
private function send ()
		{
			if (count($this->_params) > 0)
				$this->_options[ CURLOPT_URL ] .= '?' . http_build_query($this->_params);

			if (count($this->_headers) > 0)
				$this->_options[ CURLOPT_HTTPHEADER ] = $this->_headers;

			$curl = curl_init();
			curl_setopt_array($curl, $this->_options);
			$resp = curl_exec($curl);

			if ($resp === false)
			{
				$this->_response = new CurlResponse([
					'status' => CurlResponse::S_SERVERERROR,
					'body'   => 'Error #' . curl_errno($curl) . ': ' . curl_error($curl)
				]);
			}
			else
			{
				$this->_response = new CurlResponse;
				$this->_response->fromCurl($resp, $curl);
			}

			curl_close($curl);

			return $this->_response;
		}
private function send ( ) { if ( count ( $ this -> _params ) > 0 ) $ this -> _options [ CURLOPT_URL ] .= '?' . http_build_query ( $ this -> _params ) ; if ( count ( $ this -> _headers ) > 0 ) $ this -> _options [ CURLOPT_HTTPHEADER ] = $ this -> _headers ; $ curl = curl_init ( ) ; curl_setopt_array ( $ curl , $ this -> _options ) ; $ resp = curl_exec ( $ curl ) ; if ( $ resp === false ) { $ this -> _response = new CurlResponse ( [ 'status' => CurlResponse :: S_SERVERERROR , 'body' => 'Error #' . curl_errno ( $ curl ) . ': ' . curl_error ( $ curl ) ] ) ; } else { $ this -> _response = new CurlResponse ; $ this -> _response -> fromCurl ( $ resp , $ curl ) ; } curl_close ( $ curl ) ; return $ this -> _response ; }
This is general send method to use in particular request send method.

@return string|CurlResponse
This is general send method to use in particular request send method .