unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP, StdCtrls;
type
TForm1 =
class(TForm)
IdHTTP1: TIdHTTP;
Memo1: TMemo;
Button1: TButton;
Memo2: TMemo;
// procedure IdHTTP1Connected(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
//SB procedure TForm1.IdHTTP1Connected(Sender: TObject);
var
Stream:TMemoryStream;
Url:
String;
URL_:
String;
List: TStrings;
HTTP_Version: TStringStream;
Result:
String;
Test:TIdHeaderInfo;
procedure TForm1.Button1Click(Sender: TObject);
begin
IdHTTP1:=TIdHTTP.Create(
nil);
HTTP_Version:= TStringStream.Create('
HTTP/1.1');
List:=TStringlist.Create;
List.Add('
axis2');
List.Add('
services');
List.Add('
BLZService');
Url:= '
http://thomas-bayer.com/axis2/services/BLZService';
// IdHTTP1.ProtocolVersion:='1.1';
IdHTTP1.Request.ContentType:='
text/xml;charset=UTF-8';
IdHTTP1.Request.Connection:='
Keep-Alive';
IdHTTP1.Host:= '
thomas-bayer.com';
IdHTTP1.Request.UserAgent:= '
Apache-HttpClient/4.1.1 (java 1.5)';
IdHTTP1.Request.ContentLength:= 280;
// IdHHTP1.Request.
IdHTTP1.Request.AcceptEncoding:= '
gzip,deflate';
IdHTTP1.Post('
ttp://thomas-bayer.com',List,HTTP_Version);
IdHTTP1.Port:=80;
IdHTTP1.Get(URL_,Stream);
// Stream.LoadFromStream();
memo1.Lines.Add(IdHTTP1.Response.Server);
//Memo2.text:=IdHTTP1.Post('http://thomas-bayer.com/axis2/services/BLZService',List,HTTP_Version);
end;