You can use AFNetworking so you don't have to digg into the multi-part request format.
AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://192.0.168.109"]];
NSDictionary *simpleParams = @{ @"key": @"value" };
NSMutableURLRequest* request = [client multipartFormRequestWithMethod:@"POST" path:@"/Mobile_tutor/webservice/images/questions/" parameters: simpleParams constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
[formData appendPartWithFileData:fileData
name:@"paramName"
fileName:@"filename.png"
mimeType:@"image/png"];
}];
Then create an operation depending on the expected response. For example if you expect JSON:
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
// handle success
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
// handle error
}];
You can get more information in the AFNetworking documentation.