Using a proxy for NSURLConnection

好久不见. 提交于 2019-12-07 02:15:22

问题


Is there any way to get the content of a webfile (namely a .html Document) using a proxy, which is not defined in the system settings? I know that NSURLConnection is the right way to download a web file into a variable and not into a file (for which we should use NSURLDownload), but I don't find a way to use a proxy for it. Are there some unofficial APIs, Libraries or Classes or such I could use for what I want to do? I'm not that pro in Mac Programming, so I'm searching for something more or less simple.

SideSwipe


回答1:


NSURL classes wont do this. You need to drop down to CFURL. From mailing list: Re: Can NSURLConnection use Proxy Server?



来源:https://stackoverflow.com/questions/2776023/using-a-proxy-for-nsurlconnection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!