I am using the idyHTTP Indy object to request XML data from the server. After the request is made, the server sends a response, and I can read the response header OK: result: = IdHTTP1.Response.ResponseText;
Then, their system continues to send unsolicited XML data at regular intervals until the specified wait period expires.
However, now the client wants my client application to send them an HTTP response every time I receive data (the answer is based on successful XML parsing).
I can decide how to send the response if I was a server, but how can I generate the response header and use my idHTTP1 client to publish (or send, send, etc.) the header only.
I think this is not exactly defined in RFC 2616, as the server usually sends an HTTP response, not a client, namely:
6 Answer
"After receiving and interpreting the request message, the server responds with an HTTP response message.
I thought I could use TIdHTTPResponseInfo and use the WriteHeader method, but could not determine how to configure the link to the URL that I need to respond to if I am a client.
I am using Delphi XE and Indy 10.5.7
I tried several methods, but none of them were successful.
Any help or possible code examples are really appreciated!
James source share