有关ASIHTTPRequest post发送登录的问题??求搭救啊

jackyyang 发布于 2012/08/31 15:23
阅读 991
收藏 0

有关ASIHTTPRequest post发送登录的问题??求搭救啊   

 NSURL * url = [NSURL URLWithString:@"https://passport.115.com/?ac=login"];
    request = [ASIHTTPRequest requestWithURL:url];
    [request startSynchronous];
    NSError * error = [request error];
    if (!error)
    {
        NSString * urlString =@"https://passport.115.com/?ac=login";
        formRequest = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
        [formRequest setPostValue:usernameField.text forKey:@"username"];
        [formRequest setPostValue:passwordField.text forKey:@"password"];
        [formRequest startSynchronous];
NSDictionaries *header=[formRequest responseHeaders];
NSLog(@"header---%@",header);
        NSString * responseStr = [formRequest responseString];
        NSLog(@"======================>%@", responseStr);

    }


为什么输出的header 会是connection==close???难道没登录成功吗?而且返回的responseStr还是登录页面啊??小弟不才。。求高手搭救了
加载中
返回顶部
顶部