Skip to content

Commit

Permalink
[BUGFIX] Use correct POST body for submitting the glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
koehnlein committed Mar 24, 2023
1 parent ecb11ff commit 39f17ed
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Classes/Service/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,10 @@ public function __construct()
*/
public function request($url, $body = '', $method = 'POST')
{
$resource = null;
if (!empty($body)) {
$streamBody = sprintf('data://text/plain,%s', $body);
$resource = fopen($streamBody, 'r');
}
$request = new Request(
$url,
$method,
$resource,
null,
[
'Content-Type' => 'application/x-www-form-urlencoded',
'Authorization' => sprintf('DeepL-Auth-Key %s', $this->authKey),
Expand All @@ -113,7 +108,7 @@ public function request($url, $body = '', $method = 'POST')
);

$options = [
// '_body_as_string' =>
'body' => $body,
];
// read TYPO3 Proxy settings and adapt
if (!empty($GLOBALS['TYPO3_CONF_VARS']['HTTP']['proxy'])) {
Expand Down

0 comments on commit 39f17ed

Please sign in to comment.