{"ret"100029,"msg""client request's api name is not existed"}

{"ret":100029,"msg":"client request's api name is not existed"}

AFNetworking对Path的定义问题:


如果把这一串:https://graph.qq.com/user/get_user_init 定义成baseURL

那么后面加的任何Path,都会在Path前面加上一个/

这个跟NSURL有关系,AF的baseURL是用NSURL实现的,NSURL会把你给的字符串拆分成scheme,host,path,query这些东西

然后AF再处理这个NSURL,而NSURL并不仅仅是一个字符串

给 getPath加参数就行了:

{"ret"100029,"msg""client request's api name is not existed"}