unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP;
type
TForm1 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
Memo1: TMemo;
http: TIdHTTP;
cbURL: TEdit;
PostData: TMemo;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Response : TStringStream;
// PostData : string;
begin
Response := TSTringStream.Create('');
cbURL.Text := 'http://esales.mir2.com.cn/chklogin_test.asp';
Http.Post(cbURL.Text,PostData.Lines,Response);
Memo1.Text := Response.DataString;
Response.Free;
end;
end.