3lvis / Networking

Swift HTTP Networking with stubbing and caching support
MIT License
1.36k stars 112 forks source link

Add support for initializing using a URLSessionConfiguration #209

Closed 3lvis closed 7 years ago

3lvis commented 7 years ago
var configuration = URLSessionConfiguration.default
configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
configuration.urlCache = nil
configuration.timeoutIntervalForRequest = TimeInterval(60)
configuration.timeoutIntervalForResource = TimeInterval(6048000)
let networking = Networking(baseURL: "http://httpbin.org", configuration: configuration)