Hi guys,
When I call my API URL in localhost it gives 500 error and same code working on the live server.
even I tried to call URL using ajax and it works fine on localhost.
my SilverStripe code
$service = RestfulService::create('URL');
$response = $service->request('');
echo $response->getStatusCode();
and ajax code
$(document).ready(function(){
var url = 'https://abc.com/HotelDetails?Id=45';
jQuery.ajax({
url: url,
method: 'GET'
}).then(function(data) {
console.log(data);
});
});
what I found in Chrome developer tools
Sorry, I am not able to give API URL