Peacelyk
Peacelyk

Reputation: 1146

Multiple requests in one session (TidHTTP)

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

Answers (1)

Remy Lebeau
Remy Lebeau

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

Related Questions