[AFHTTPRequestSerializer requestWithMethod:URLString; 'Invalid parameter not satisfying: URLString'

使用AF網絡請求剛登陸就報錯,錯誤信息如下:

*** Assertion failure in -[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:], /Users/sunqingqing/Desktop/work/drp-app-iOS/Drp-app-ios/Lib/AFNetworking3.0/AFURLRequestSerialization.m:353

2016-08-08 19:08:46.434 Drp-app-ios[1036:483025] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: URLString'

 

錯誤也很快的定位到了API的URL有問題,最後再看生產環境的URL,自己擦亮了雪亮的雙眼才發現錯誤就在URL多了一個空格,害的博主找了那麼久也沒看出問題

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章