Releases: Kong/unirest-php
2.6.1
disable SSL host verification with helper method: Unirest\Request::verifyHost(false)
2.6.0
ability to set custom curl options:
Unirest\Request::curlOpt()
Unirest\Request::curlOpts()
Unirest\Request::clearCurlOpts()
2.5.0
- add: cookie string support
- fix: cookieFile undefined variable
2.4.0
- added cookies support
2.3.1
- Mockbin integration for testing and documentation.
2.3.0
New Utility Methods
- Allow direct access to internal cURL handle with
Unirest\Request::getCurlHandle()
- expose cURL info with
Unirest\Request::getInfo()
for debugging failed requests
2.2.1
PHP 5.4 lacks support for CURLOPT_USERNAME
and CURLOPT_PASSWORD
2.2.0
Advanced Authentication Methods
Unirest\Request::auth($username, $password = '', $method = CURLAUTH_BASIC);
Supports Basic, Digest, Negotiate, NTLM Authentication natively, see README for more details.
Proxy Support
Unirest\Request::proxy($address, $port = 1080, $type = CURLPROXY_HTTP, $tunnel = false);
-
proxy port defaults to 1080 as per cURL defaults
-
check the cURL docs for more info on tunneling.
-
proxy type to be one of
CURLPROXY_HTTP
,CURLPROXY_HTTP_1_0
,CURLPROXY_SOCKS4
,CURLPROXY_SOCKS5
,CURLPROXY_SOCKS4A
, andCURLPROXY_SOCKS5_HOSTNAME
.check the cURL docs for more info.
full usage example:
// quick setup with default port: 1080
Unirest\Request::proxy('10.10.10.1');
// custom port and proxy type
Unirest\Request::proxy('10.10.10.1', 8080, CURLPROXY_HTTP);
// enable tunneling
Unirest\Request::proxy('10.10.10.1', 8080, CURLPROXY_HTTP, true);
Proxy Authentication
Unirest\Request::proxyAuth($username, $password = '', $method = CURLAUTH_BASIC);
Supports Basic, Digest, Negotiate, NTLM Authentication natively, see README for more details.
2.1.0
2.0.0
Cleanups & Updates
- added EditorConfig file
- added Code Coverage through Code Climate
- added support for PHP 5.6 in Travis
- added Hack Lang Environment to Travis
- updated testing to use phpunit
- various coding style, and comprehensibility fixes in accordance with PSR-1 & PSR-2
- added enhanced response header parser
- removed redundant code where applicable
- updated
Unirest\File::add
signature to follow aftercurl_file_create
with fallback
Breaking Changes
- removed PHP 5.3 reached EOL on 14 Aug 2014
- relocated files to
src
andtests
as perphpunit
standard tree structure - renamed classes with logical name spacing to
Unirest\Request
,Unirest\Response
,Unirest\Method
,Unirest\File