| 测试已测试 | ✓ |
| Lang语言 | SwiftSwift |
| 许可证 | MIT |
| 发布最新发布 | 2017年6月 |
| SwiftSwift 版本 | 3.0 |
| SPM支持 SPM | ✓ |
由 Kyle Fuller 维护。
# Web Linking
Swift 实现 Web Linking (RFC5988)。
CocoaPods 是推荐的安装方法。
pod 'WebLinking'给定以下 Link 标头在 NSHTTPURLResponse 上。
Link: <https://api.github.com/user/repos?page=3&per_page=100>; rel="next",
<https://api.github.com/user/repos?page=50&per_page=100>; rel="last"
我们可以找到响应中的下一个链接
if let link = response.findLink(relation: "next") {
print("We have a next link with the URI: \(link.uri).")
}或检查所有可用的链接
for link in response.links {
print("We have a link with the relation: \(link.relationType) to \(link.uri).")
}Web Linking 在 MIT 许可下发布。有关更多信息,请参阅 LICENSE。