I am to send data to digital meter for which I want data in NSMutableData form. I am trying to assign it data but getting errors.
NSMutableData *body = [[NSMuta
You could convert NSString into NSData with[@"1" dataUsingEncoding:NSUTF8StringEncoding], the rest of your code is OK.
[@"1" dataUsingEncoding:NSUTF8StringEncoding]
NSMutableData *body = [[NSMutableData alloc] initWithData:[@"1" dataUsingEncoding:NSUTF8StringEncoding]];