Here is my code
Alamofire.request(URL, method: requestType, parameters: param, encoding: URLEncoding.default, headers: headers).responseJSON { (response:DataResponse<Any>) in
switch(response.result) {
case .success(_):
if response.result.value != nil{
completion(response.result.value!)
}
break
case .failure(_):
print(response.result.error!)
failure(response.result.error!)
break
}
}
responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." UserInfo={NSDebugDescription=Invalid value around character 0.})) Could not cast value of type 'Alamofire.AFError' (0x100969000) to 'Swift.Array<__ObjC.NSDictionary>' (0x174094340). 2017-11-29 16:01:09.744776 WTV_GO[2333:1690232] Could not cast value of type 'Alamofire.AFError' (0x100969000) to 'Swift.Array<__ObjC.NSDictionary>' (0x174094340).
I got this error when putting firebase token and other parameters to the server but same parameters works fine through Postman, is there any solution? Thank you!