R3Networking 0.1.3

R3Networking 0.1.3

Regis Araujo Melo维护。



  • Regis Araujo

网络编程

本包的描述。

let networkService = NetworkService()

guard let url = URL(string: "https://jsonplaceholder.typicode.com/todos/1") else {
    return
}

networkService.request(url: url, method: .get) { (result: Result<Todo, Error>) in
    switch result {
    case .success(let todo):
        print(todo.title)
    case .failure(let error):
        print(error.localizedDescription)
    }
}