Vinay W
Vinay W

Reputation: 10190

multiple requests in a single HttpConnection in android?

the Apache guide on Http connections mention that

The overhead of connection handshaking can be significant, especially for small HTTP messages. One can achieve a much higher data throughput if open connections can be re-used to execute multiple requests.

What i want to do is, i want to send 20 similar post request (i.e. the same headers), but the data i send with it is pretty small. So with every request i'm sending the same header data again and again.So i'm looking for a workaround.

for eg:

My Question : Is it, or is it not, possible to achieve that using Android's HttpClient? If Yes, please provide/point me to a lesson/tutorial/example.

Thanks in advance.

PS: i did some research, couldn't quite find anything useful.

Upvotes: 0

Views: 380

Answers (1)

user1521536
user1521536

Reputation:

— Edited —

I'm sorry I misunderstood your question.

What you want is obviously possible. However, I think it's up to the server side. If you code server then you can control the format of messages between client and server. If not, then perhaps you should follow server's APIs.

Upvotes: 1

Related Questions