Created
July 3, 2014 22:54
-
-
Save iwaffles/136b2e15161472045c57 to your computer and use it in GitHub Desktop.
Query Params with AFNetworking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; | |
NSDictionary *params = @{ | |
@"name": name, | |
@"another_value": something_else | |
}; | |
NSString *urlString = @"http://postSomethingHere.com/"; | |
[manager POST:urlString | |
parameters:params | |
constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { | |
} success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
//success | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
NSLog(@"error: %@", error); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment