Hallo,
bekomme immer die Fehlermeldung : "HTTP/1.0 301
Moved Permanently" ?
Delphi-Quellcode:
function ExecuteAPI:
string;
var
lHTTP: TIdHTTP;
lParamList: TStringList;
begin
lParamList := TStringList.Create;
lParamList.Add('
<?xml version="1.0" encoding="UTF-8">');
lParamList.Add('
<testOperation version="1.0> ');
lParamList.Add('
<uniqueId>blablablabla</uniqueId>');
lParamList.Add('
<basicData>');
lParamList.Add('
<externalNumber>OF120131</externalNumber>');
lParamList.Add('
<keyword>F2/keyword>');
lParamList.Add('
<announcement>Test</announcement>');
lParamList.Add('
<location>Teststrasse 1</location>');
lParamList.Add('
<geo_location>');
lParamList.Add('
</basicData>');
lParamList.Add('
</testOperation>');
lHTTP := TIdHTTP.Create(
nil);
try
Result := lHTTP.Post('
http://login.test.info/api?authkey=blablablabla=&call=operationData', lParamList);
finally
lHTTP.Free;
lParamList.Free;
end;
end;
Aufruf