"message": "invalid parameters: Access is denied", while sending json request to server -ios

848 Views Asked by At

I'm posting a json to server, but I'm getting response from server like this- "message": "invalid parameters: Access is denied"

i sending request like this-

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);
    }];

but i got response from server :

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

please give a good solution to fix this issue, thanks

1

There are 1 best solutions below

0
On
[httpClient postPath:@"hello" parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"data1", @"data1_key", @"data2", @"data2_key2", nil]