Permalink
Browse files

Automatically use curl adapter when installed

  • Loading branch information...
1 parent e97597b commit 75ae7440b8f21853cabfc8bb8107b8bdf05f9b56 @sloonz sloonz committed Mar 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Sag.php
View
2 src/Sag.php
@@ -98,7 +98,7 @@ public function __construct($host = "127.0.0.1", $port = "5984")
*/
public function setHTTPAdapter($type = null) {
if(!$type) {
- $type = self::$HTTP_NATIVE_SOCKETS;
+ $type = extension_loaded("curl") ? self::$HTTP_CURL : self::$HTTP_NATIVE_SOCKETS;
}
// nothing to be done

0 comments on commit 75ae744

Please sign in to comment.