for some reason, httputils job stops sending POST bu a GET
B4X:
xml = "<TAX>\n"
xml = xml & "<NF>" & "12345" & "</NF>\n"
xml = xml & "<ID>" & ph.getSettings("android_id") & "</ID>\n"
xml = xml & "</TAX>\n"
j.Initialize("Job", Me)
j.PostString("http://fdsfdsfsd.com/restxxxxx.php",xml)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log("answer:" & j.GetString)
....
for some reason, httputils job stops sending POST bu a GET
B4X:
xml = "<TAX>\n"
xml = xml & "<NF>" & "12345" & "</NF>\n"
xml = xml & "<ID>" & ph.getSettings("android_id") & "</ID>\n"
xml = xml & "</TAX>\n"
j.Initialize("Job", Me)
j.PostString("http://fdsfdsfsd.com/restxxxxx.php",xml)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log("answer:" & j.GetString)
....
1. You should spend 3 minutes and learn how to use smart strings.
2. HttpJob.PostString sends a POST request. It doesn't matter whether it is http or https.
1. You should spend 3 minutes and learn how to use smart strings.
2. HttpJob.PostString sends a POST request. It doesn't matter whether it is http or https.
In fact, apache (or B4X) was converting POST into GET, because we have tested.
The solution was to install a new certificate on the server.
After that new SSL, everithing is working perfectly and the source code is now sending again a POST as it was in the past.
I don't have any explanation.
Could be a man in the middle???
But it's solved.
It is interesting how you have tested it? what is console.log($_SERVER['REQUEST_METHOD']) on PHPserver or log(req.Method) on B4Jserver?
The result I tested is POST
Without the index.php, assuming the app will automatically read the index file. So even though the request was received by the index.php it was treating it as GET until I updated the URL with the index.php file