Ich habe einige Zweifel darüber, wie man etwas auf einen WebService hochladen kann.So laden Sie ein Array zu einem WebService
Ich habe das schon mit nach Informationen von meinem Webservice bekommen:
NSString * URLString = [NSString stringWithFormat:@"%@%@", kBaseHost, [NSString stringWithFormat:kWSProjectList, token]];
NSURL *url = [NSURL URLWithString:URLString];
NSURLRequest * request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendSynchronousRequest:request inBackgroundWithCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSString *json = [[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding];
NSLog(@"%@", json);
NSDictionary * _response = [json JSONValue];
NSLog (@"%@", _response);
NSNotification* notification = [NSNotification notificationWithName:kWSNotificationDidReceiveDataProjectList object:_response];
[[NSNotificationCenter defaultCenter] postNotification:notification];
}];
Jetzt muß sie das Gegenteil tun, ich habe die Informationen an die WebService laden, und ich habe keine Ahnung, wie .. Jemand könnte mich ein wenig führen?
Was ist diese Methode, sendSynchronousRequest: inBackgroundWithCompletionHandler: Ich sehe nicht, dass man in der Dokumentation – rdelmar
@interface NSURLConnection (Hintergrund) + (void) sendSynchronousRequest: (NSURLRequest *) Anfrage inBackgroundWithCompletionHandler: (void (^) (NSURLResponse *, NSData *, NSError *)) Handler; – Marnerk