URL写得正确,我在浏览器中用数据测试它并正确发送,但是当我发出请求时,它返回它是成功的,但它实际上并没有写入数据。任何的想法?
- (void)writeAboutMe:(NSString *)about withIcebreaker:(NSString *)icebreaker
{
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
NSString *urlString = [NSString stringWithFormat:@"http://nailorbail.net63.net/submit_about_and_icebreaker.php?username=%@&about=%@&icebreaker=%@",[SignInViewController getUsernameString] ,about,icebreaker];
NSLog(@"%@",urlString);
[request setURL:[NSURL URLWithString:urlString]];
[request setHTTPMethod:@"GET"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Current-Type"];
NSURLConnection *conn = [[NSURLConnection alloc]initWithRequest:request delegate:self];
if(conn)
NSLog(@"Connection Successful");
else
NSLog(@"Connection could not be made");
[conn release];
}