We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ff0e4b commit ecc2e32Copy full SHA for ecc2e32
1 file changed
src/Stichoza/GoogleTranslate/TranslateClient.php
@@ -186,9 +186,9 @@ public function getResponse($string) {
186
]);
187
188
try {
189
- $response = $this->httpClient->post($this->urlBase, ['query' => $queryArray]);
+ $response = $this->httpClient->post($this->urlBase, ['body' => $queryArray]);
190
} catch (GuzzleRequestException $e) {
191
- throw new ErrorException("Error processing request");
+ throw new ErrorException($e->getMessage());
192
}
193
194
$body = $response->getBody(); // Get response body
0 commit comments