I don't know why, but suddenly this doesn't work anymore;
are there any changes in the last updates?
Now I have no idea, what to do.
One month ago everything was working fine.
The form_params are checked and ok;
are there any changes in the last updates?
Code:
try {
$client = \XF::app()->http()->client();
$response = $client->request('POST', 'https://www.example.com/api/threads/',
[
'debug' => false,
'headers' =>
[
'XF-Api-Key' => '12345',
'XF-Api-User: 12345',
//'Content-Type' => 'application/json',
'Content-Type: application/x-www-form-urlencoded',
],
'form_params' =>
[
'node_id' => 123,
'title' => $title,
'message' => $message,
'tags' => $tag,
'prefix_id' => $prefixId,
],
]
);
}
catch (\GuzzleHttp\Exception\RequestException $e) {
\XF::logException($e, false, "Error: ");
$continue = false;
}
Now I have no idea, what to do.
One month ago everything was working fine.
The form_params are checked and ok;