我正在尝试使用以下代码在服务器中创建和保存测试用户:
LBRESTAdapter *adapter = ((AppDelegate *)[[UIApplication sharedApplication] delegate]).adapter;
if (adapter) {
TeacherRepository *repo = (TeacherRepository *)[adapter repositoryWithClass:[TeacherRepository class]];
if (repo) {
Teacher *st = (Teacher *)[repo createUserWithEmail:@"test@test.com" password:@"test"];
if (st) {
[st saveWithSuccess:^{
NSLog(@"Saved in server!");
} failure:^(NSError *error) {
NSLog(@"Error: %@", error.description);
}];
}
}
}
但我不断收到此错误响应:
Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 404"
我已经搜索了这个错误和类似的其他错误,但找不到任何可以解决我的问题的东西,那么可能是什么原因造成的?