Networking Versions Save

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

4.0.0

6 years ago

Xcode 9 and Swift 4 support!

Breaking changes

  • Renamed disableErrorLogging to isErrorLoggingEnabled
  • Changed initializer to use URLSessionConfiguration instead of the custom ConfigurationType.

Before

let networking = Networking(baseURL: "http://httpbin.org", configurationType: .default)

After

var configuration = URLSessionConfiguration.default
configuration.timeoutIntervalForRequest = TimeInterval(60)
configuration.timeoutIntervalForResource = TimeInterval(6048000)
let networking = Networking(baseURL: "http://httpbin.org", configuration: configuration)

3.0.3

7 years ago
  • Update to Swift 3.1 (Xcode 8.3)

3.0.2

7 years ago

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?
}

3.0.1

7 years ago

3.0.0

7 years ago

After 3 months of 2.0.0 we have refined Networking, refactored the internals, improved the unit tests and now we're ready to delete all the deprecated methods and make the big jump to 3.0.0.

Here are the things that you need to change in order to use Networking 3.

3.0.0-beta3

7 years ago
  • Refactored internals, cleaned up a few methods

3.0.0-beta2

7 years ago

Changes from Beta 1

Merged the error and the HTTPURLResponse into one object for each Result case.

Previously

After 3 months of 2.0.0 we have refined Networking, refactored the internals, improved the unit tests and now we're ready to delete all the deprecated methods and make the big jump to 3.0.0.

Here are the things that you need to change in order to use Networking 3.

3.0.0-beta1

7 years ago

After 3 months of 2.0.0 we have refined Networking, refactored the internals, improved the unit tests and now we're ready to delete all the deprecated methods and make the big jump to 3.0.0.

Here are the things that you need to change in order to use Networking 3.

2.8.0

7 years ago
  • Moved all methods to use lowercase instead of uppercase to follow Swift 3 guidelines
// Before
networking.GET(....)
networking.POST(....)
networking.PUT(....)
networking.DELETE(....)

// After
networking.get(....)
networking.post(....)
networking.put(....)
networking.delete(....)
  • Documented disabling error logging
let networking = Networking(baseURL: "http://httpbin.org")
networking.disableErrorLogging = true
  • Add support for synchronous networking
let networking = Networking(baseURL: "http://httpbin.org")
networking.isSynchronous = true

2.7.1

7 years ago