@@ -180,8 +180,8 @@ public class AlamofireWrapper: NSObject {
180180 _ requestId: String ,
181181 _ uploadProgress: ( ( Progress ) -> Void ) ? ,
182182 _ downloadProgress: ( ( Progress ) -> Void ) ? ,
183- _ success: @escaping ( NSHTTPURLResponse ? , Any ? ) -> Void ,
184- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
183+ _ success: @escaping ( HTTPURLResponse ? , Any ? ) -> Void ,
184+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
185185 ) {
186186 requestWithThreading (
187187 method,
@@ -209,8 +209,8 @@ public class AlamofireWrapper: NSObject {
209209 _ progressOnMainThread: NSNumber ? , // NSNumber wrapper for optional Bool
210210 _ uploadProgress: ( ( Progress ) -> Void ) ? ,
211211 _ downloadProgress: ( ( Progress ) -> Void ) ? ,
212- _ success: @escaping ( NSHTTPURLResponse ? , Any ? ) -> Void ,
213- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
212+ _ success: @escaping ( HTTPURLResponse ? , Any ? ) -> Void ,
213+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
214214 ) {
215215
216216 guard let url = URL ( string: urlString) else {
@@ -277,7 +277,7 @@ public class AlamofireWrapper: NSObject {
277277 self . removeRequest ( id: requestId)
278278
279279 // Get the HTTP response
280- let httpResponse = response. response as? NSHTTPURLResponse
280+ let httpResponse = response. response as? HTTPURLResponse
281281
282282 if let error = response. error {
283283 let nsError = self . createNSError ( from: error, response: response. response, data: response. data)
@@ -303,8 +303,8 @@ public class AlamofireWrapper: NSObject {
303303 _ requestId: String ,
304304 _ constructingBodyWithBlock: @escaping ( MultipartFormDataWrapper ) -> Void ,
305305 _ progress: ( ( Progress ) -> Void ) ? ,
306- _ success: @escaping ( NSHTTPURLResponse ? , Any ? ) -> Void ,
307- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
306+ _ success: @escaping ( HTTPURLResponse ? , Any ? ) -> Void ,
307+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
308308 ) {
309309 uploadMultipartWithThreading (
310310 urlString,
@@ -328,8 +328,8 @@ public class AlamofireWrapper: NSObject {
328328 _ progressOnMainThread: NSNumber ? ,
329329 _ constructingBodyWithBlock: @escaping ( MultipartFormDataWrapper ) -> Void ,
330330 _ progress: ( ( Progress ) -> Void ) ? ,
331- _ success: @escaping ( NSHTTPURLResponse ? , Any ? ) -> Void ,
332- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
331+ _ success: @escaping ( HTTPURLResponse ? , Any ? ) -> Void ,
332+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
333333 ) {
334334
335335 guard let url = URL ( string: urlString) else {
@@ -392,7 +392,7 @@ public class AlamofireWrapper: NSObject {
392392 self . removeRequest ( id: requestId)
393393
394394 // Get the HTTP response
395- let httpResponse = response. response as? NSHTTPURLResponse
395+ let httpResponse = response. response as? HTTPURLResponse
396396
397397 if let error = response. error {
398398 let nsError = self . createNSError ( from: error, response: response. response, data: response. data)
@@ -417,8 +417,8 @@ public class AlamofireWrapper: NSObject {
417417 _ fileURL: URL ,
418418 _ requestId: String ,
419419 _ progress: ( ( Progress ) -> Void ) ? ,
420- _ success: @escaping ( NSHTTPURLResponse ? , Any ? ) -> Void ,
421- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
420+ _ success: @escaping ( HTTPURLResponse ? , Any ? ) -> Void ,
421+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
422422 ) {
423423
424424 var afRequest = session. upload ( fileURL, with: request)
@@ -451,7 +451,7 @@ public class AlamofireWrapper: NSObject {
451451 self . removeRequest ( id: requestId)
452452
453453 // Get the HTTP response
454- let httpResponse = response. response as? NSHTTPURLResponse
454+ let httpResponse = response. response as? HTTPURLResponse
455455
456456 if let error = response. error {
457457 let nsError = self . createNSError ( from: error, response: response. response, data: response. data)
@@ -474,8 +474,8 @@ public class AlamofireWrapper: NSObject {
474474 _ bodyData: Data ,
475475 _ requestId: String ,
476476 _ progress: ( ( Progress ) -> Void ) ? ,
477- _ success: @escaping ( NSHTTPURLResponse ? , Any ? ) -> Void ,
478- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
477+ _ success: @escaping ( HTTPURLResponse ? , Any ? ) -> Void ,
478+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
479479 ) {
480480
481481 var afRequest = session. upload ( bodyData, with: request)
@@ -508,7 +508,7 @@ public class AlamofireWrapper: NSObject {
508508 self . removeRequest ( id: requestId)
509509
510510 // Get the HTTP response
511- let httpResponse = response. response as? NSHTTPURLResponse
511+ let httpResponse = response. response as? HTTPURLResponse
512512
513513 if let error = response. error {
514514 let nsError = self . createNSError ( from: error, response: response. response, data: response. data)
@@ -537,8 +537,8 @@ public class AlamofireWrapper: NSObject {
537537 _ headers: NSDictionary ? ,
538538 _ requestId: String ,
539539 _ progress: ( ( Progress ) -> Void ) ? ,
540- _ success: @escaping ( NSHTTPURLResponse ? , String ? ) -> Void ,
541- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
540+ _ success: @escaping ( HTTPURLResponse ? , String ? ) -> Void ,
541+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
542542 ) {
543543
544544 guard let url = URL ( string: urlString) else {
@@ -602,7 +602,7 @@ public class AlamofireWrapper: NSObject {
602602 self . removeRequest ( id: requestId)
603603
604604 // Get the HTTP response
605- let httpResponse = response. response as? NSHTTPURLResponse
605+ let httpResponse = response. response as? HTTPURLResponse
606606
607607 if let error = response. error {
608608 let nsError = self . createNSError ( from: error, response: response. response, data: nil )
@@ -627,8 +627,8 @@ public class AlamofireWrapper: NSObject {
627627 _ headers: NSDictionary ? ,
628628 _ requestId: String ,
629629 _ progress: ( ( Progress ) -> Void ) ? ,
630- _ success: @escaping ( NSHTTPURLResponse ? , String ? ) -> Void ,
631- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
630+ _ success: @escaping ( HTTPURLResponse ? , String ? ) -> Void ,
631+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
632632 ) {
633633
634634 guard let url = URL ( string: urlString) else {
@@ -691,7 +691,7 @@ public class AlamofireWrapper: NSObject {
691691 self . removeRequest ( id: requestId)
692692
693693 // Get the HTTP response
694- let httpResponse = response. response as? NSHTTPURLResponse
694+ let httpResponse = response. response as? HTTPURLResponse
695695
696696 if let error = response. error {
697697 let nsError = self . createNSError ( from: error, response: response. response, data: nil )
@@ -720,9 +720,9 @@ public class AlamofireWrapper: NSObject {
720720 _ requestId: String ,
721721 _ sizeThreshold: Int64 ,
722722 _ progress: ( ( Progress ) -> Void ) ? ,
723- _ headersCallback: @escaping ( NSHTTPURLResponse ? , Int64 ) -> Void ,
724- _ success: @escaping ( NSHTTPURLResponse ? , String ? ) -> Void ,
725- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
723+ _ headersCallback: @escaping ( HTTPURLResponse ? , Int64 ) -> Void ,
724+ _ success: @escaping ( HTTPURLResponse ? , String ? ) -> Void ,
725+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
726726 ) {
727727
728728 guard let url = URL ( string: urlString) else {
@@ -772,7 +772,7 @@ public class AlamofireWrapper: NSObject {
772772
773773 // Call headersCallback on first response (only once)
774774 callbackState. callOnce {
775- let httpResponse = response as? NSHTTPURLResponse
775+ let httpResponse = response as? HTTPURLResponse
776776 let contentLength = response. expectedContentLength
777777 headersCallback ( httpResponse, contentLength)
778778 }
@@ -787,7 +787,7 @@ public class AlamofireWrapper: NSObject {
787787
788788 // Apply interceptors
789789 for interceptor in requestInterceptors {
790- downloadRequest = downloadRequest. interceptor ( interceptor) as! DownloadRequest
790+ downloadRequest = downloadRequest. interceptor ( interceptor)
791791 }
792792
793793 // Apply server trust evaluation if security policy is set
@@ -810,7 +810,7 @@ public class AlamofireWrapper: NSObject {
810810 self . removeRequest ( id: requestId)
811811
812812 // Get the HTTP response
813- let httpResponse = response. response as? NSHTTPURLResponse
813+ let httpResponse = response. response as? HTTPURLResponse
814814
815815 if let error = response. error {
816816 let nsError = self . createNSError ( from: error, response: response. response, data: nil )
@@ -843,8 +843,8 @@ public class AlamofireWrapper: NSObject {
843843 _ requestId: String ,
844844 _ sizeThreshold: Int64 ,
845845 _ progress: ( ( Progress ) -> Void ) ? ,
846- _ success: @escaping ( NSHTTPURLResponse ? , Any ? , String ? ) -> Void ,
847- _ failure: @escaping ( NSHTTPURLResponse ? , Error ) -> Void
846+ _ success: @escaping ( HTTPURLResponse ? , Any ? , String ? ) -> Void ,
847+ _ failure: @escaping ( HTTPURLResponse ? , Error ) -> Void
848848 ) {
849849
850850 guard let url = URL ( string: urlString) else {
@@ -899,7 +899,7 @@ public class AlamofireWrapper: NSObject {
899899 self . removeRequest ( id: requestId)
900900
901901 // Get the HTTP response
902- let httpResponse = response. response as? NSHTTPURLResponse
902+ let httpResponse = response. response as? HTTPURLResponse
903903
904904 if let error = response. error {
905905 let nsError = self . createNSError ( from: error, response: response. response, data: response. data)
0 commit comments