I have a problem with my API. here's the situation :
I don't know what the cause of the problem, since in my localhost is just fine. can anyone help me?
EDIT:
EDIT :
return response()->json([
'status' => true
], 200);
$.ajax({
type: "get",
url: GLOBAL_URL + "endpointapi",
dataType: "json",
xhrFields: {
withCredentials: true
},
success : function(){},
etc...
mm.... anyone?
EDIT:
Is hosting service provider matter? I mean since I'm using free hosting, I'm afraid that is limited and can't use for API purpose. If so, anyone know a free hosting and can use for API purpose?
Ok everyone, I think I have the answer. simple... It's because infinity free hosting cannot use for API purposes (for free version, IDK for the paid version). You can search it why it cannot support for API purposes.
I change my hosting to paid hosting (of course not in infinityfree app), and then it works just fine.