diff --git a/Source/Network/Client.swift b/Source/Network/Client.swift index 589ceb8..0366d10 100644 --- a/Source/Network/Client.swift +++ b/Source/Network/Client.swift @@ -20,7 +20,7 @@ public protocol Client { header: ClientHeader, body: Request, timeout: Interval?, - optionBlock: (inout URLRequest) -> Void + optionBlock: @escaping (inout URLRequest) -> Void ) -> Promise, Error> } @@ -30,7 +30,7 @@ extension Client { method: ClientMethod = .get, header: ClientHeader = [:], timeout: Interval? = nil, - optionBlock: (inout URLRequest) -> Void = { _ in } + optionBlock: @escaping (inout URLRequest) -> Void = { _ in } ) -> Promise, Error> where RequestValue? == Request { request( url: url, @@ -48,7 +48,7 @@ extension Client { header: ClientHeader = [:], body: Request, timeout: Interval? = nil, - optionBlock: (inout URLRequest) -> Void = { _ in } + optionBlock: @escaping (inout URLRequest) -> Void = { _ in } ) -> Promise, Error> { request( url: url, diff --git a/Source/Network/Implement/Client/DataClient.swift b/Source/Network/Implement/Client/DataClient.swift index ac30a35..4a5199c 100644 --- a/Source/Network/Implement/Client/DataClient.swift +++ b/Source/Network/Implement/Client/DataClient.swift @@ -39,7 +39,7 @@ extension DataClient { header: ClientHeader = [:], body: Data? = nil, timeout: Interval? = nil, - optionBlock: (inout URLRequest) -> Void = { _ in } + optionBlock: @escaping (inout URLRequest) -> Void = { _ in } ) -> Promise, Error> { let pending = Promise, Error>.pending() diff --git a/Source/Network/Implement/Client/JSONClient.swift b/Source/Network/Implement/Client/JSONClient.swift index 57d4a5e..2201c0a 100644 --- a/Source/Network/Implement/Client/JSONClient.swift +++ b/Source/Network/Implement/Client/JSONClient.swift @@ -36,7 +36,7 @@ extension JSONClient { header: ClientHeader = [:], body: JSON? = nil, timeout: Interval? = nil, - optionBlock: (inout URLRequest) -> Void = { _ in } + optionBlock: @escaping (inout URLRequest) -> Void = { _ in } ) -> Promise, Error> { let header = header.merging([ "Content-Type": "application/json"