Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NSURLRequest + NSHTTPURLResponse 显然是角色的方式。我如何获取标题信息?
在 NSHTTPURLResponse 上调用 allHeaderFields 会将它们作为字典返回。
[response allHeaderFields]
其中 response 是您的 NSHTTPURLResponse 对象。
⌘-双击代码中对“NSHTTPURLResponse”的引用,它会显示文档。