Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230578

Ionic 1 http post failing

$
0
0

I am compiling an Ionic version 1 App to a device.

When i run ionic serve on the browser i can search and get a search result as the return.

I am using an http.post:

$http.post("http://www.example.com/myapi/mysearch.php", $scope.formData )
          .success( function(data) {

After installing on the smartphone all i got is an error message (error).

I think this can be a lack of the whitelist cordova plugin, wich i do remove and reinstall again .

Also have added : <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"> To the index.html file.

How can i enable the apk to make post requests to the API ?


Viewing all articles
Browse latest Browse all 230578

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>