Hi.
In the early versions of Indy it was like this:
TIdMappedPortContext (AContext) .NetData // (String)
Now:
TIdMappedPortContext (AContext) .NetData // (TidBytes)
Please help me. How do I get a response in string?
Sorry for my english, google translation!
But I can not understand why there is no response body, only headings.
So, in this case, since you are trying to extract an HTTP server's response body, then in the OnOutboundData event, append the NetData as-is to the end of your own buffer. EVERY TIME the OnOutBoundData event is fired, after copying the NetData into your buffer, scan your buffer for the '$0D $0A $0D $0A' byte sequence that separates HTTP headers from HTTP body, and if found then extract the HTTP headers from the buffer, take note of how the HTTP body (if present) is formatted and terminated (see RFC 2616 Section 4.4 for the rules), and then read the body data as needed, in a loop, updating your state machine on each iteration, until the buffer no longer holds a complete message. It may potentially take multiple OnOutboundData events for you to reach the end of the headers, and/or the end of the body. Then, and only then, can you process the headers and body as needed, and then start all over for the next HTTP response.
Can a small example of how to do this?
Made through IdHTTPPRoxyServer.
As I understand it, is that better?
If you run online radio (streaming audio) then it does not play.
At the same time, the memory of the program starts to grow!
As I understand it because of tmFullDocument.
If I choose tmStreaming, then the HTTPDocument event does not work.
How can get out of this situation?
Please tell me why slows down very much idHTTPProxyServer? :'(