Skip to content

Releases: Kong/unirest-php

2.6.1

08 Jun 17:30
Compare
Choose a tag to compare

disable SSL host verification with helper method: Unirest\Request::verifyHost(false)

2.6.0

08 Apr 21:36
Compare
Choose a tag to compare

ability to set custom curl options:

  • Unirest\Request::curlOpt()
  • Unirest\Request::curlOpts()
  • Unirest\Request::clearCurlOpts()

2.5.0

03 Apr 17:11
Compare
Choose a tag to compare
  • add: cookie string support
  • fix: cookieFile undefined variable

2.4.0

02 Apr 18:23
Compare
Choose a tag to compare
  • added cookies support

2.3.1

07 Mar 11:04
Compare
Choose a tag to compare
  • Mockbin integration for testing and documentation.

2.3.0

01 Mar 07:52
Compare
Choose a tag to compare

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

05 Feb 18:06
Compare
Choose a tag to compare

PHP 5.4 lacks support for CURLOPT_USERNAME and CURLOPT_PASSWORD

2.2.0

05 Feb 17:28
Compare
Choose a tag to compare

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, and CURLPROXY_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

15 Jan 07:00
Compare
Choose a tag to compare
  • send requests using any standard or custom HTTP Method using Unirest\Request::send
  • set custom JSON Decode Flags using the Unirest\Request::jsonOpts() method.
  • You can now set default headers in bulk using Unirest\Request::defaultHeaders()

2.0.0

15 Jan 01:13
Compare
Choose a tag to compare

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 after curl_file_create with fallback

Breaking Changes

  • removed PHP 5.3 reached EOL on 14 Aug 2014
  • relocated files to src and tests as per phpunit standard tree structure
  • renamed classes with logical name spacing to Unirest\Request, Unirest\Response, Unirest\Method, Unirest\File