Networking Versions Save

Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support

5.1.0

3 years ago
  • Updated to Xcode 12

5.0.3

3 years ago

5.0.2

3 years ago
  • Renamed Result protocol to NetworkingResult (thanks to @mkll for helping with this!)

5.0.1

4 years ago

5.0.0

5 years ago
  • Swift 5 and Xcode 10.2 support

4.4.0

5 years ago

4.3.0

5 years ago
  • Fixes NetworkActivityIndicator not showing (#222)
  • Fix Swift 4 warnings (#226)
  • Cache response for GET requests (#230)
  • Introduce more result types (#231)

4.2.0

6 years ago

4.1.1

6 years ago
  • Fix warnings regarding characters being deprecated in Xcode 9.

4.1.0

6 years ago

Added a way to extract the data from the response of a GET, POST, PUT, DELETE request. Before you would be able to access the JSON as dictionary or array, now you can also access the data. This is useful for example if you want to use Networking with JSONDecoder.

let networking = Networking(baseURL: "http://httpbin.org")
networking.get("/get") { result in 
   switch result { 
   case let .success(response): 
       // response.dictionaryBody -> JSON 
       // response.data -> JSON data
   case .failure: 
       // Handle error
   } 
} 

In order to achieve this in a clean way I had to modify the JSON enum, while doing this I noticed that the JSON enum was public, it wasn't meant to be public so I've converted it into a protected enum. The biggest breaking change of doing this is that some projects might be making use of the JSON.from(:bundle:) method, now you can access this utility using FileManager.json(from:bundle:).