i want to do a post request in afnetworking
this is my code whit ASI:
NSURL *mainurl = [NSURL URLWithString:@"xxxx/api/xxx/"];
ASIFormDataRequest *requestt = [ASIFormDataRequest requestWithURL:mainurl];
[requestt addPostValue:GETUnicidentifire forKey:@"UniqueId"];
[requestt addPostValue:JsonOrderDetail forKey:@"jsonProduct"];
[requestt addPostValue:BranchId forKey:@"BranchId"];
[requestt addPostValue:OrderToTime forKey:@"OrderToTime"];
[requestt setCompletionBlock:^{
// Process the response
}];
[requestt setFailedBlock:^{
NSError *error = [requestt error];
how can i do the same thong in AFnetworking ?
Not an exact answer, but here's a very similar POST request from my application:
_manager is an instance of AFHTTPRequestOperationManager initialized as: