From 773ee52779c7d26d7a5d5f9f49c12d96fd637a9d Mon Sep 17 00:00:00 2001 From: Andrea Sacerdoti Date: Fri, 8 Jan 2021 17:23:06 +0100 Subject: [PATCH 1/2] Switch to using ephemeral URLSessionConfigurations by default --- Sources/SwiftQuests/Request.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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() From f1fd9b7222022e992ddf93c82b28e304b74bdfa8 Mon Sep 17 00:00:00 2001 From: Andrea Sacerdoti Date: Fri, 8 Jan 2021 17:23:16 +0100 Subject: [PATCH 2/2] Update gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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/