swift3 - Alamofire responseObject cannot use for Bool response -


api response boolean "true" or "false", alamofire responseobject couldn't use. using alamofireobjectmapper 4.0 , swift 3.0

could suggest me how should do?

currently calling api that:

alamofire.request(api_url, method: .post, parameters: nil, encoding: jsonencoding.default, headers : headers).responseobject{ (response: dataresponse<testdto>) in          switch(response.result) {         case .success(_):             success(response.result.value!)             break          case .failure(_):             failure(response.result.error!)             break         }     } 

api response true or false.

use responsejson below,

alamofire.request(api_url, method: .post, parameters: nil, encoding: jsonencoding.default, headers : headers).responsejson{ (response: any) in print(response) } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -