Does Httprequest work in an APK for Android
Does Httprequest work in an APK for Android
Thanks to TI-994A I could make a connection to my Mysql server in PureBasic. However in Spiderbasic this seems to be another question. The method looks different. I wanted to do this in an Android app. But the help says "The URL to execute the request. Due to security constraints, it is only possible to execute a request on the same domain" Does this main I can't use httprequest in an android app? Or how do I call the API in another way?
Re: Does Httprequest work in an APK for Android
I'm this far now. I can call the API and it works from the spiderbasic IDE. So the spiderbasicscript is not on the same server.
In the api.php file I added.
In the api.php file I added.
Code: Select all
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type, Authorization");
// preflight requests (OPTIONS)
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
http_response_code(200);
exit();
}