Reputation: 1146
i have a little device which i connect to over http. I send some xml and then wait for the answer.
http:tidhttp;
XMLData:TStringStream;
http.Post(DeviceUrl,XMLData);
Post method sends the data and waits for the reply(also xml). When that happens session is over, right? But i need to send more data within that session.
Thanks in advance!
Upvotes: 2
Views: 1837
Reputation: 595320
Sessions are kept track of on the server end. TIdHTTP
is a client component. HTTP is a stateless protocol, and does not require persistent connections between requests within a single session. Most servers persist session information from one request to another using either cookies or URL query strings, both of which work with TIdHTTP
.
Upvotes: 3