I have a problem using Infobip sms gateway. I have no idea about below code when i execute this code there is a error called no HttpRequest class found. Any one please help me.
<?php
$request = new HttpRequest();
$request->setUrl('https://api.infobip.com/sms/1/text/single');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'accept' => 'application/json',
'content-type' => 'application/json',
'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
));
$request->setBody('{
"from":"InfoSMS",
"to":"41793026727",
"text":"Test SMS."
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}