I have a part of code in my componenent which works in Joomla! 3.9.x, but in Joomla! 4.0-beta-dev i get a 503 error. My code is the following :
use Joomla\Http\Http;
use Joomla\Http\Transport\Stream as StreamTransport;
public function sendtostopforumspam()
{
$options = array();
$transport = new StreamTransport($options);
$http = new Http($options, $transport);
$data = array('username' => $username, 'ip_addr' => $ip, 'email' => $email, 'api_key' => $key);
$response = $http->post('https://www.stopforumspam.com/add', $data);
if ($response->code == '200')
{
// do something...
}
}
In the response i can see an error 503
What are changes in Joomla! 4.0 which prevent that working ?
Thanks by advance