diff --git a/.gitignore b/.gitignore index 667fa55..d4b63cc 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,5 @@ fastlane/test_output # After new code Injection tools there's a generated folder /iOSInjectionProject # https://github.com/johnno1962/injectionforxcode -iOSInjectionProject/ \ No newline at end of file +iOSInjectionProject/ +build/ diff --git a/Sources/SwiftQuests/Request.swift b/Sources/SwiftQuests/Request.swift index c5dcb9a..2ea65ec 100644 --- a/Sources/SwiftQuests/Request.swift +++ b/Sources/SwiftQuests/Request.swift @@ -69,7 +69,7 @@ open class Request: AbstractRequest { /// The request `URLSession`. /// /// Defaults to a session with a `default` `URLSessionConfiguration` unless otherwise specified. - public var session = URLSession(configuration: .default) + public var session = URLSession(configuration: .ephemeral) /// The wrapped `URLRequest` object. public var urlRequest: URLRequest! @@ -138,9 +138,10 @@ open class Request: AbstractRequest { } if let credential = credential { - URLCredentialStorage.shared.set(credential, - for: configuration.protectionSpace, - task: task) + URLCredentialStorage.shared.set( + credential, + for: configuration.protectionSpace, + task: task) } task.resume()