this question is partly pointing to my previous question : Ionic + Angular POST request return state 404
But i wasn't able to find working solution.
Problem is following:
if I do request from the mobile app running on the device i always get response 404:
Request Method:POST
Status Code:404 Not Found (from cache)
Request Headersview source
Accept:application/json, text/plain, */*
Content-Type:text/plain
Origin:file://
User-Agent:Mozilla/5.0 (Linux; Android 4.4.2; Lenovo Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
Request Payloadview source
{,…}
But if i tried the same request on the desktop using Postman plugin in the Chrome browser i always get response 200 with data what i need.
I thought that it was issue caused by Angular http method but in previous post i was noticed that is not true.
How can i avoid this please? Should i set some headers in HTML of the app, during the request or on the server side (PHP)?
Many thanks for any advice.
EDIT:
I tried also set cache:false by this way:
$http({
method : 'POST',
url : $scope.remoteUrl,
data: postData,
headers: headersData,
cache: false,
timeout: 10000
// success response
})
But without luck.