I have a variable NSNumbercalled task_id. I want to place this variable NSNumberin NSString(post request). Here is what I tried:
NSString *post = [NSString stringWithFormat:@"&task_id=%@", task_id];
and
NSString *post = [NSString stringWithFormat:@"&task_id=%@", [NSString stringWithFormat:@"%@",task_id]];
For some reason, the line does not include the task_id value in the POST request. How can I put NSNumberin a string?
Update
task_id is NSCFNumber according to this code:
NSLog(@"%@", [task_id class]);
Many thanks,
Peter
source
share