Jquery .ajax fails when basic auth username has @ symbol (ios / cordova)

后端 未结 3 533
無奈伤痛
無奈伤痛 2021-01-02 16:32

I have a phonegap app w/ jQuery 1.9.1 Worked great as long as the username doesn\'t have \'@\' symbol in it (like in email addresses). It only fails on iOS.

I suspec

3条回答
  •  春和景丽
    2021-01-02 17:15

    I would bet the problem is not using a contentType : "application/x-www-form-urlencoded".

    Anyway, you should definitely debug your Webview against a real device, to look for xhr errors on the Safari console. If you are not familiar with Safari remote debugging, it's easy:

    • in your iPhone/iPad, go to Settings -> Safari -> Advanced => Enable Web Inspector.
    • connect to MacOSX via cable, and select your app from the "Develop" menu of Safari in your desktop
    • Now check any errors regarding your request, or better yet, debug the code and callbacks step by step.

提交回复
热议问题