Помогите программно авторизоваться на сайте ....
Код:
var
HTTP:TidHTTP;
SSL: TIdSSLIOHandlerSocket;
PostData:TStringList;
Response:string;
coc:TIdCookieManager;
begin
HTTP:=TidHTTP.Create(nil);
HTTP.RedirectMaximum:=100;
SSL:= TIdSSLIOHandlerSocket.Create(http);
coc:= TIdCookieManager.Create(http);
http.HandleRedirects := true;
http.AllowCookies:=True;
//http.Host:='world.needforspeed.com';
//HTTP.request.ProxyConnection:='Keep-Alive';
//http.Request.UserAgent:='Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8';
//http.Request.Accept:='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
//http.Request.AcceptLanguage:='ru,en-us;q=0.7,en;q=0.3';
//http.Request.AcceptEncoding:='gzip,deflate';
//http.Request.AcceptCharSet:='windows-1251,utf-8;q=0.7,*;q=0.7';
//http.Request.Referer:='http://world.needforspeed.com/login';
//http.Request.ContentLength:=74;
//http.Request.ContentType:='Content-Type=application/x-www-form-urlencoded';
http.IOHandler:= SSL;
SSL.SSLOptions.Method:=sslvTLSv1;
PostData:=TStringList.Create;
PostData.Add('j_username=login');
PostData.Add('j_password=password');
PostData.Add('nfsw_web_remember_me=on');
//world.needforspeed.com/login
Response:=HTTP.Post('https://world.needforspeed.com/nfsw_web_security_check',PostData);
Form1.memo1.Text:=Response;
end;
в итоге получаю
Код:
Connection Closed Gracefully.
А хотелось бы увидеть что вернул мне запрос (((