I'm using AFNetworking
for my app.
I want to create a queue mechanism with different priority for each HTTP request
.
For that - I need to be able to create an HTTP Request
using AFNetowrking
but use it later.
The example for creating an HTTP request is:
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[manager GET:@"http://example.com/resources.json" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
This code will send the request immediately. How can I just create the request (method, parameters, url), but use it at a later time?