Hallo, bekomme es einfach nicht hin! Fehlercode E/A 105 ??
Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var
HTTP: TIdHTTP;
RequestBody: TStream;
ResponseBody:
string;
begin
HTTP := TIdHTTP.Create;
try
try
RequestBody := TStringStream.Create('
{123456789}',
TEncoding.UTF8);
try
HTTP.Request.Accept := '
input.xml HTTP/1.0';
HTTP.Request.ContentType := '
application/x-www-form-urlencoded';
ResponseBody := HTTP.Post('
http://login.fireboard.net/api?authkey={123456789}&call=operation_data',
RequestBody);
WriteLn(ResponseBody);
WriteLn(HTTP.ResponseText);
finally
RequestBody.Free;
end;
except
on E: EIdHTTPProtocolException
do
begin
WriteLn(E.
Message);
WriteLn(E.ErrorMessage);
end;
on E:
Exception do
begin
WriteLn(E.
Message);
end;
end;
finally
HTTP.Free;
end;
ReadLn;
ReportMemoryLeaksOnShutdown := True;
end;