From 8513e311e98993b189e181dfdce981f77fc8f833 Mon Sep 17 00:00:00 2001 From: Andrea Sacerdoti Date: Mon, 20 Apr 2020 11:47:19 +0200 Subject: [PATCH] Open Request.perform --- Sources/Requests/Request.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Requests/Request.swift b/Sources/Requests/Request.swift index 5836eed..77c8de4 100644 --- a/Sources/Requests/Request.swift +++ b/Sources/Requests/Request.swift @@ -126,7 +126,7 @@ open class Request: AbstractRequest { /// - error: The task error. /// - Throws: An error if either the `urlRequest` property was not properly initialised, or the `completionHandler` /// throws. - public func perform(_ completionHandler: @escaping (_ result: Result) throws -> Void) { + open func perform(_ completionHandler: @escaping (_ result: Result) throws -> Void) { let task = session.dataTask(with: urlRequest) { data, response, error in if let error = error { @@ -153,7 +153,7 @@ open class Request: AbstractRequest { /// - completionHandler: An handler called upon completion. /// - result: The response result. /// - error: The task error. - public func perform(decoding object: T.Type, + open func perform(decoding object: T.Type, _ completionHandler: @escaping ( _ result: Result<(T?, URLResponse?), Error>) throws -> Void) {