想在iphone上的phonegap应用程序中使用https请求 [英] Want to use https request in phonegap application on iphone

查看:136
本文介绍了想在iphone上的phonegap应用程序中使用https请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用jquery的方法getJSON()在phonegap iphone应用程序中调用https请求,虽然它在正常的safari中运行良好,但在移动safari中,它会出现类似下载失败的错误 - Safari无法下载此文件

I am trying to call https request in phonegap iphone app using jquery's method getJSON(),though it work fine in normal safari,but in mobile safari,it gives error like Download Failed-Safari cannot download this file

请建议我......

Please suggest me...

谢谢

推荐答案

如果我正确读到这一点,我认为它与JSON没有关系。我建议查看https请求的URL是什么。

If I'm reading this right, I don't think it has to do with JSON. I'd suggest looking at what the URL is for the https request.

我认为,通常,该错误是因为您尝试下载的文件类型是手机不支持。它可以在正常的safari上支持(例如下载.exe或.dmg),但是手机对于允许下载的类型更具选择性 - 因为它没有保存到磁盘以允许用户稍后处理未知类型。

I believe that, generally, that error is because you are trying to download a file type that is not supported on the phone. It may be supported on "normal safari" (e.g. downloading an .exe or .dmg), but the phone is more selective about which types it will allow for download - since it doesn't "save to disk" to allow the user to deal with the unknown type later.

我没有调查过,但我猜这与手机支持的协议处理程序和/或mime类型有关 - 你要求的URL是不支持。 :)

I have not looked into it, but I would guess this has to do with supported protocol handlers and/or mime types for the phone - and the URL you are requesting is not supported. :)

这篇关于想在iphone上的phonegap应用程序中使用https请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆