AFN 經典報錯系列(二)php
1. 報錯以下:ios
Assertion failure in -[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:], /Users/Yan/Desktop/Yan/Doctor/Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m:353json
2016-04-24 11:22:01.022 fastDoctor[4725:172619] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: URLString'api
2. 緣由reason: 'Invalid parameter not satisfying: URLString'app
URL拼接錯誤!!! -----> NSString * _url = @" http://iosapi.baidu.cn/doctor/searchCI3List.json.php";url
正確的URL-------> NSString * _url = @"http://iosapi.baidu.cn/doctor/searchCI3List.json.php";spa
3. ???code
多加了一個而空格!!!it
4.修改以後 運行!
io
responseObject{
code = 1; ------>表示請求成功
data = "<null>";-------> 數據爲空
msg = FAIL; ------>信息
}