【发布时间】:2014-08-31 14:37:33
【问题描述】:
我正在开发 iOS 应用程序,我在使用 AFnetworking 2.0 从客户端接收数据到服务器时遇到问题。 Json,以下是我在 iOS 上使用 post 方法的代码,请帮助!
我需要服务器端代码(php),如何获取数据
在 iOS 上发帖
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
NSDictionary *params = @ {@"user" :@"Akhtar", @"pwd" :@"123" };
[manager POST:@"URl" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject)
{
NSLog(@"JSON: %@", responseObject);
[self ResponseHandlingWithResponseData:responseObject WithTag:tag];
} failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
NSLog(@"Error: %@", error);
[self errorResponseHandlingWithResponseDict:error.userInfo WithTag:tag];
}];
【问题讨论】:
标签: php ios json afnetworking afnetworking-2