diff --git a/src/HttpClient.php b/src/HttpClient.php index b6b5afb..a7db799 100644 --- a/src/HttpClient.php +++ b/src/HttpClient.php @@ -154,7 +154,8 @@ private function prepareOptions(array $params = array()) $options = array(); if (count($params) > 0) { - $options[RequestOptions::JSON] = $params; + $options[RequestOptions::FORM_PARAMS] = $params; + $options[RequestOptions::VERIFY] = false; $body = json_encode($params); } else { $body = ''; @@ -162,8 +163,8 @@ private function prepareOptions(array $params = array()) $defaultHeaders = array( 'User-Agent' => 'elmage/textng/php/'.Client::VERSION, - 'Content-Type' => 'application/json', - 'Accept' => 'text/plain, application/json', + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Accept' => 'text/plain, application/json', 'text/html', ); $options[RequestOptions::HEADERS] = $defaultHeaders;