I am using Indy idHTTP object to request XML data from a server. Once the request is made, the server sends a reply, and I can read the reply header OK: result := IdHTTP1.Response.ResponseText;
Their system then continues to send unsolicited XML data at regular intervals until a predetermined timeout period expires.
However, the customer now wants my client application to send them a HTTP response back every time I receive data (the response based on successful parsing of the XML).
I can work out how to send a response if I was the server, but how can I generate a response header and use my idHTTP1 client to post (or put, send etc) just the header.
This is I think, not exactly defined in RFC 2616, as the server normally sends the HTTP response, not the client, viz:
6 Response
"After receiving and interpreting a request message, a server responds with an HTTP response message."
I thought I could use TIdHTTPResponseInfo and use the WriteHeader method, but could not work out how to set up the linkage to the URL I need to reply to if I am the client.
I am using Delphi XE and Indy 10.5.7
I've tried a number of ways, but none of them successfully.
Any help or possible code examples are really appreciated!
TIdHttpis the CLIENT HTTP component, it's the equivalent of an web browser. How can someone send youunsolicited XML data at regular intervals until a predetermined timeout period expires? It's like saying:After doing this Google search, I keep getting new web pages in my browser until a predefined time expires. - Cosmin Prund