Networking — 3.0.2
- Added convenience accessor for the result's error #197
Useful for when you don't care about the result but more if there's an error or not.
Before:
networking.delete("/user/10") { result in
switch result {
case .success:
completion(nil)
case .failure(let response):
completion(response.error)
}
}
Now:
networking.delete("/user/10") { result in
completion(result.error) // NSError?
}