Skip to content

Commit

Permalink
Change GET to POST, ref #13
Browse files Browse the repository at this point in the history
Google translate itself uses POST request for larger amounts of data
  • Loading branch information
Stichoza committed Mar 18, 2015
1 parent 05f0603 commit 8ff0e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stichoza/GoogleTranslate/TranslateClient.php
Expand Up @@ -186,7 +186,7 @@ public function getResponse($string) {
]);

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

0 comments on commit 8ff0e4b

Please sign in to comment.