Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

AFJSONRequestOperation with POST Method give "signature_invalid" #116

Open
aisgirish opened this issue Feb 15, 2016 · 0 comments
Open

AFJSONRequestOperation with POST Method give "signature_invalid" #116

aisgirish opened this issue Feb 15, 2016 · 0 comments

Comments

@aisgirish
Copy link

I am using OAuth1 to authorise API and get access token.
When I call POST method it give me "oauth_problem=signature_invalid".

 NSMutableURLRequest *request = [self.myClient requestWithMethod:@"POST" path:apiURL parameters:jsonObj];
    NSDictionary *dict = @{ @"Content-Type":@"application/json",@"Accept":@"*/*"};

    [request setAllHTTPHeaderFields:dict];
    [request setHTTPShouldHandleCookies:true];

 AFJSONRequestOperation *jsonOperation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
     NSLog(@"Success: %@", JSON);

     } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
         NSLog(@"Header: %@",[request allHTTPHeaderFields]);
     NSLog(@"Error: %@", error);
     }];

     [jsonOperation start];

Please help me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant