PHONEGAP AJAX catching ip along with the url

Asked

Viewed 42 times

0

I’m making a simple request using phonegap:

$.ajax({
        type: "GET",
        dataType: "json",
        url: "http://mydomain.com/request",
        data: params,
        success: function(result){

        },
        error: function(e, data, status, xhr){

        }
    })

But when running it executes the following url:

http://<ip>:3000/proxy/http://mydomain.com/request
  • All proxies are off

  • People commented on Sozão to try with phonegap browser run instead of phonegap serve not to use the proxy, I do not know if you could apply to your case.

  • I was running through the desktop app itself, not via command line

  • There is no configuration place where I inform my base url? to replace the <ip>

1 answer

0


I did, by simply altering the dataType: "json" for dataType: "jsonp".

There was another error, but then another question. From Jsonp

Browser other questions tagged

You are not signed in. Login or sign up in order to post.