0
我有一個請求我會使用ASIHttpRequest,對於這個頁面我該怎麼辦?ASIHttpRequest登錄空回覆
<form method="post" action="Login.jsp">
<fieldset>
<legend>Insert</legend>
<ul>
<li><label for="username">User</label><input maxlength="10" id="user" name="username" value=""></li>
<li><label for="password">Password</label><input maxlength="16" type="password" id="pwd" name="password" value="" ></li>
<li id="errore"> error</li>
<li><input type="submit" id="go" value="enter"></li>
</ul>
</fieldset>
</form>
我必須讓這個:
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"url....Login.jsp"]];
[request setRequestMethod:@"POST"];
[request setPostValue:@"user" forKey:@"username"];
[request setPostValue:@"pass" forKey:@"password"];
[request setDelegate:self];
[request startSynchronous];
NSLog(@"Response %d ==> %@", request.responseStatusCode, [request responseString]);
,但我得到: 響應0 ==>(null)
我也使用了[request setValidatesSecureCertificate:NO];
錯誤在哪裏?而且我還想閱讀讓我記錄的頁面。謝謝!
我做了這個,但我收到錯誤發送請求。 – Doom 2012-02-10 22:09:55
你確定你的網址是否正確? – 2012-02-11 00:05:16
哪個asihttp委託方法確實被調用?完成或失敗? – Lefteris 2012-02-12 14:34:29