我有链接到文档(例如:https://example.com/test/test.pdf)。我试图使用ASIHTTPRequest
,但它不起作用。我知道我可以通过使用NSURL
得到它,但是有没有其他方法或框架?HTTPS请求 - 在iOS上获取文档
0
A
回答
0
你不能用NSURL获取文档的内容,NSURL是url的表示,你必须做这个请求。
这里的一些元素:iPhone SDK: How do you download video files to the Document Directory and then play them?
0
你或许应该在这里使用NSURLConnection的。 See documentation on it.
0
这里是如何与STHTTPRequest https://github.com/nst/STHTTPRequest
__block STHTTPRequest *r = [STHTTPRequest requestWithURLString:@"https://example.com/test/test.pdf"];
r.completionBlock = ^(NSDictionary *headers, NSString *body) {
NSData *pdfData = r.responseData;
};
r.errorBlock = ^(NSError *error) {
//
};
[r startAsynchronous];
做
相关问题
- 1. Node.js https获取请求ECONNRESET
- 2. 如何在iOS上创建HTTPS请求?
- 3. iOS HTTPS请求101
- 4. iOS阻止HTTPS请求
- 5. Android HTTPS获取请求挂在响应= client.execute(请求);
- 6. VB.NET Winsock HTTPS发布并获取请求
- 7. Tshark过滤http/https获取请求
- 8. Windows Phone C#异步获取https请求
- 9. https使用python获取请求urllib2
- 10. Visual Basic https获取请求 - 接受SSL
- 11. https获取请求的格式
- 12. 铬:GET请求取消CORS HTTPS请求
- 13. Soapclient https请求
- 14. 获取文件上传请求
- 15. 安全上$ HTTPS请求
- 16. HTTPS请求仅在iOS上失败,Ionic 2
- 17. IIS上的Laravel 5.4站点在https请求上获得404
- 18. iOS HTTPS请求不能正常工作
- 19. IOS中的HTTPS发布请求
- 20. http POST vs GET请求获取发送XML文件的文档
- 21. http请求https https webservice?
- 22. 获取文件请求
- 23. 获取Objective-C HTTP请求iOS 5
- 24. iOS:获取Facebook图形请求
- 25. iOS获取请求的最佳做法
- 26. HTTPS ajax请求
- 27. Android HTTPS请求?
- 28. 请求HTTPS URL
- 29. AngularJS在POST上向https请求http
- 30. Grunt-init - 在template.js上发出HTTPS请求