像这样的东西......
NSString *nid = @":";
NSString *vocab = @":";
NSString *inturl = @"testoverview";
NSString *mail = @"your@fbr.dk";
NSString *md5pw = @"password";
NSArray *jsonArray = [NSArray arrayWithObjects:inturl, mail, md5pw, nil]; // create your json array or dict
NSError *error;
// serialize data
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonArray
options:NSJSONWritingPrettyPrinted
error:&error];
if (! jsonData) {
NSLog(@"Got an error: %@", error);
} else {
// get json string
NSString *jsonString = [[[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding] autorelease];
// do a Request
NSString *url = @"your url";
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:30.0];
[request setValue:jsonString forHTTPHeaderField:@"Field You Want To Set"];
[[NSURLConnection alloc] initWithRequest:request delegate:self];
}