I have multiple http requests, but they must combine one parameter named "accessToken" which rely on another individual request's response to send the server.
For example, I have request1,request2,request3,request4,request5 ,maybe more and more .These requests in everywhere ,I don't want to control it like this:
[self.AFRequestManager GET:@"individual reqeust" parameters:allParameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSDictionary *parameters = @{@"accessToken":responseObject[@"data"]};
[self.AFRequestManager GET:@"reqeust1" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
}];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
}];
So when I send all these requests one by one ,how to control the relationship between them?