问题标签 [cocoa-spdy]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
2249 浏览

ios - 带有 AFNetworking 的 iOS 版 SPDY

我正在为 iOS 应用程序尝试 SPDY,该应用程序当前使用 AFNetworking (2.1.0) 来处理 HTTP 请求。服务器端,我使用的是 Google App Engine(使用SPDYCheck检查)它是 SPDY 友好的。

这是我在代码中集成 SPDY 的方式。

我正在使用 AFHTTPRequestOperationManager

我将 SPDY 嵌入到initWithBaseURL:

请注意,我的网址是格式https://myapp.appspot.com/_ah/所以我在传递给 SPDY 时重新格式化registerOrigin:spdyURL 看起来像https://myapp.appspot.com:443

我想这就是我所需要的?但是添加 SPDY 代码后我无法发送请求。调试消息显示以下错误:

我一点头绪都没有。希望有在 iOS 上使用 SPDY 经验的人可以提供帮助!