I have an object with the following members:
NSString *reqStr = "param1=val1¶m2=val2¶m3=val3&..";
NSData *imageData = [NSJPEGRepresentation (myimage)];
NSData *fileContents = [NSData initWithFileContents(myfile.txt)];
How can I send this out to Windows WCF? Do I send it as stream of bytes, and attach to httprequest? Or, will this be sockets? I am not sure how to pack these things as one thing as in one stream of bytes or whatever it may be the way to format such an object.
Any help?
Since you said that you already know how to send
imageDatawhich isNSData. Why not convertregStrtoNSDataand combine all three together as a single data and send.To convert
NSStringtoNSData:And use
NSMutableData‘sappendDatamethod to combine all three.