Skip to content

Commit

Permalink
Use body instead of query, ref #13 and #8
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Mar 18, 2015
1 parent 8ff0e4b commit ecc2e32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Stichoza/GoogleTranslate/TranslateClient.php
Expand Up @@ -186,9 +186,9 @@ public function getResponse($string) {
]);

try {
$response = $this->httpClient->post($this->urlBase, ['query' => $queryArray]);
$response = $this->httpClient->post($this->urlBase, ['body' => $queryArray]);
} catch (GuzzleRequestException $e) {
throw new ErrorException("Error processing request");
throw new ErrorException($e->getMessage());
}

$body = $response->getBody(); // Get response body
Expand Down

0 comments on commit ecc2e32

Please sign in to comment.