Skip to content

Commit

Permalink
Driver: Explicitly request JSON responses
Browse files Browse the repository at this point in the history
  • Loading branch information
chibimagic committed Mar 26, 2015
1 parent 35abc0b commit 47ffcc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static function Curl($http_type, $full_url, $payload = null, $escape_payl
curl_setopt($curl, CURLOPT_HEADER, TRUE);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, WebDriver::$CurlConnectTimeoutSec);
curl_setopt($curl, CURLOPT_TIMEOUT, WebDriver::$CurlTimeoutSec);
$headers = array('Expect:');
$headers = array('Expect:', 'Accept: application/json');
if ($http_type === "POST" || $http_type === "PUT") {
$headers[] = 'Content-Length: ' . strlen($payload);
}
Expand Down

0 comments on commit 47ffcc3

Please sign in to comment.