-1

我正在向服务器发布一个 json,但我从服务器收到这样的响应 - “消息”:“无效参数:访问被拒绝”

我发送这样的请求-

AFHTTPClient * httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
NSDictionary *parameters = [NSDictionary dictionaryWithObject:json forKey:@"json"];

[httpClient postPath:@"/xxx/yyyy/zzzz" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"success parsing %@",responseObject);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"failure parsing  %@",error);
    }];

但我得到了服务器的响应:

{
    "message": "invalid parameters: Access is denied",
    "data": null,
    "result": "false"
},

请给出一个好的解决方案来解决这个问题,谢谢

4

1 回答 1

0
[httpClient postPath:@"hello" parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"data1", @"data1_key", @"data2", @"data2_key2", nil]
于 2014-01-15T05:05:11.823 回答