Coder Social home page Coder Social logo

weblinking.swift's Introduction

# Web Linking

Swift implementation of Web Linking (RFC5988).

Installation

CocoaPods is the recommended installation method.

pod 'WebLinking'

Example

Given the following Link header on an 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"

We can find the next link on a response:

if let link = response.findLink(relation: "next") {
  print("We have a next link with the URI: \(link.uri).")
}

Or introspect all available links:

for link in response.links {
  print("We have a link with the relation: \(link.relationType) to \(link.uri).")
}

License

Web Linking is licensed under the MIT license. See LICENSE for more info.

weblinking.swift's People

Contributors

kylef avatar maxsz avatar steam avatar ishkawa avatar

Watchers

James Cloos avatar Suyeol Jeon avatar  avatar

Forkers

sakebook

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.