Skip to content

Commit

Permalink
AlamofireKit Version = 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arzrasel committed Jan 25, 2021
1 parent 37fc5e6 commit 8eb6f2e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions AlamofireKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
# * pod lib lint --allow-warnings
# * Push to git and release
# * pod trunk push --allow-warnings ORRR>> pod trunk push AlamofireKit.podspec --allow-warnings
# AlamofireKit Version = 0.1.0
# AlamofireKit Version = 0.1.1


Pod::Spec.new do |s|
s.name = 'AlamofireKit'
s.version = '0.1.0'
s.version = '0.1.1'
s.summary = 'A short description of AlamofireKit.'

# This description is used to generate tags and improve search results.
Expand Down
1 change: 1 addition & 0 deletions Example/AlamofireKit/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import AlamofireKit

class ViewController: UIViewController {

Expand Down
16 changes: 9 additions & 7 deletions Source/AlamofireKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Created by Rz Rasel on 2021-01-24.
//
// AlamofireKit Version = '0.1.0'
// AlamofireKit Version = '0.1.1'
// Version = '0.1.0'

import Foundation
Expand All @@ -22,13 +22,15 @@ public class AlamofireKit {
requestModifier: RequestModifier? = nil) {
let request = AF.request(convertible, method: method, parameters: parameters, encoding: URLEncoding.default, headers: headers)
request.responseJSON { response in
debugPrint("DEBUG_LOG_PRINT: response data url \(String(describing: response.request)) line: \(#line)")
debugPrint("DEBUG_LOG_PRINT: status code \(String(describing: response.response?.statusCode)) line: \(#line)")
// debugPrint("DEBUG_LOG_PRINT: response data url \(String(describing: response.request)) line: \(#line)")
// debugPrint("DEBUG_LOG_PRINT: status code \(String(describing: response.response?.statusCode)) line: \(#line)")
print("DEBUG_LOG_PRINT: response data url \(String(describing: response.request)) line: \(#line)")
print("DEBUG_LOG_PRINT: status code \(String(describing: response.response?.statusCode)) line: \(#line)")
guard let responseData = response.value else {
debugPrint("DEBUG_LOG_PRINT: data error \(String(describing: response.error)) line: \(#line)")
print("DEBUG_LOG_PRINT: data error \(String(describing: response.error)) line: \(#line)")
return
}
debugPrint("DEBUG_LOG_PRINT: data success \(responseData) line: \(#line)")
print("DEBUG_LOG_PRINT: data success \(responseData) line: \(#line)")
}
}
public typealias Completion<T> = (_ success: Bool, _ data: T) -> Void
Expand All @@ -46,8 +48,8 @@ public class AlamofireKit {
requestModifier: RequestModifier? = nil) {
let request = AF.request(convertible, method: method, parameters: parameters, encoding: encoding, headers: headers)
request.responseDecodable(of: dataModel.self) { (response) in
debugPrint("DEBUG_LOG_PRINT: request url \(String(describing: response.request)) line: \(#line)")
debugPrint("DEBUG_LOG_PRINT: status code \(String(describing: response.response?.statusCode)) line: \(#line)")
print("DEBUG_LOG_PRINT: request url \(String(describing: response.request)) line: \(#line)")
print("DEBUG_LOG_PRINT: status code \(String(describing: response.response?.statusCode)) line: \(#line)")
guard let responseData = response.value else {
completion(false, nil, response.error)
return
Expand Down

0 comments on commit 8eb6f2e

Please sign in to comment.