PhoneGap ajax call fails everytime

后端 未结 6 1996
臣服心动
臣服心动 2021-01-15 12:27

I am developing a mobile application using PhoneGap, and I have to access some services from another project. I am using jquery-2.0

6条回答
  •  我在风中等你
    2021-01-15 13:32

    If the url: 'http://localhost:62465/api/account?email=johndoe@yahoo.com' is not reachable from your mobile, there's a very useful trick to use.

    With www.ngrok.com, you can assign an internet domain to your locally unreachable port.

    Just signup, get an access token, and then you can use: ngrok -authtoken myauthtoken -subdomain=mysubdomainname 62465

    And then you can access your computer with the url http://mysubdomainname.ngrok.com/api/account?email=johndoe@yahoo.com

提交回复
热议问题