Api returns Error:UnknownHostException in android emulator

Hello guys,
I’m building a mobile app for academic purpose using ionic, vue and laravel for backend.
My api returns Error:UnknownHostException for host server and for localhost i get error:connect exception. In the web browser all works well but error comes when i run the app in emulator.
I have looking through various websites for a 2 weeks and could not get clear information on how to go about it.

THIS IS MY API
submit:function(){
Http.get({
url: ‘http://localhost/somewebsite/api/test’,
headers: {
‘Content-Type’: ‘application/json’,
‘Access-Control-Allow-Origin’:‘*’
}
}).then(function(response){
console.log(response.data);
alert(response.data.length);

}).catch(function (error) {
alert(error);
});
}

I will appreciate any assistance because my academic presentation is getting nearer.
Thank you…