Error Domain=AFNetworkingErrorDomain Code=-1011 "Request failed: bad request (400)" UserInfo=0x7ff04a42cfa0 {AFNetworkingOperationFailingURLResponseErrorKey= { URL: http://leancloud.cn:443/1.1/users } { status code: 400, headers {
Connection = close;
"Content-Length" = 611;
"Content-Type" = "text/html";
Date = "Sat, 27 Jun 2015 09:25:44 GMT";
Server = Tengine;
} }, NSLocalizedDescription=Request failed: bad request (400), NSErrorFailingURLKey=http://leancloud.cn:443/1.1/users}

哪位大大帮忙解决一下???请求数据没问题,因为我可以用get取到数据

request 的 header 中要带着 appId 和 appKey
在仔细看下文档 https://leancloud.cn/docs/rest_api.html6

curl -X POST \
-H "X-AVOSCloud-Application-Id: u5ryft8euv27ppvvlebry9ccz" \
-H "X-AVOSCloud-Application-Key: dl9v76me49hzf7aa04lxbt7i3" \
-H "Content-Type: application/json" \
-d '{"username":"cooldude6","password":"p_n7!-e8","phone":"415-392-0202"}' \
https://api.leancloud.cn/1.1/users

是不是没有在 application:didFinishLaunchingWithOptions 函数内调用:
[AVOSCloud setApplicationId:@"yourAppId" clientKey:@"yourAppKey"];
??

我没有用SDK,直接用AFNetworking在模拟器测试API接口,应该不需要吧,因为我用get请求就可以顺利获取到数据呢

这个为什么都没有答案呢