Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi IDHTTPServer und Rückgabewert (https://www.delphipraxis.net/72333-idhttpserver-und-rueckgabewert.html)

GuenterS 28. Jun 2006 18:10


IDHTTPServer und Rückgabewert
 
Hallo,

ich habe eine Kombination zweier Programme, welche über das HTTP Protokoll kommunizieren sollen (z.B. Statusabfrage).

Im "client" habe ich folgenden Code platziert
Delphi-Quellcode:
lStream := TStringStream.Create('');
try
   lResultStr := IDHTTP.Post('http://192.168.1.5/status', lStream);
finally
  lStream.Free;
end;
Im Serverteil des anderen Programmes habe ich folgendes:
Delphi-Quellcode:
procedure TForm1.HTTPSRVCommandGet(AThread: TIdPeerThread;
  ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
begin
  if (UpperCase(ARequestInfo.Document) = '/STATUS') then
    aResponseInfo.ContentText := '1';
end;
Ich würde nun gerne im Client, den Rückgabewert auswerten können, aber das kommt einfach nicht an. Vermutlich verwende ich einfach eine falsche Eigenschaft.

Hat vielleicht jemand einen Hinweis was ich falsch mache?


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:07 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz