Can you please help me to convert this curl post request into a javascript(Axios) request?
https://url.com/api/send.php
function send_sms($url,$apikey,$smsno=1,$destination,$content){
$fields = array(
'apikey' => $apikey,
'smsno' => $smsno,
'destination' => $destination,
'content' => $content
);
$fields_string = http_build_query($fields);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return $output;
}
