2 taohualaonu taohualaonu 于 2015.05.31 01:31 提问

iOS 服务端java接收到数据为空

我们的服务端,忽然无法接收到我post 传过去的json数据,以前好几个月都没问题,我的代码大致如下,求大神解救
self.manager = [AFHTTPRequestOperationManager manager];
self.manager.responseSerializer = [AFJSONResponseSerializer serializer];

self.manager.requestSerializer=[AFJSONRequestSerializer serializer];

        self.manager.responseSerializer = [[AFHTTPResponseSerializer alloc] init];
        self.manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
        [self.manager.requestSerializer setValue:@"iphone" forHTTPHeaderField:@"header-platform"];

        self.manager.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey];
        self.manager.securityPolicy.allowInvalidCertificates = YES;
        self.manager.securityPolicy.validatesDomainName = NO;
        self.manager.securityPolicy.validatesCertificateChain = NO;

        self.manager.requestSerializer.timeoutInterval = 60;

      [self.manager POST:urlString parameters:dict success:^(AFHTTPRequestOperation *operation, id responseObject) {
          [self requestFinished:responseObject];
      } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
          [self requestFailed:error];
      }];
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!