Lloyd
Lloyd

Reputation: 29668

Bandwidth Limits & HttpWebRequest

Is there any way to throttle a HttpWebRequest? I can call GetResponse() but that will download the response at it's own speed and I may want to limit the rate of download.

So far I can't see anything that would let me?

Upvotes: 1

Views: 1491

Answers (2)

Lloyd
Lloyd

Reputation: 29668

As Thomas Levesque said, GetResponse() downloads the headers and the beginning and not the whole item like previously thought.

This means that I can read in chunks and throttle as needed.

Upvotes: 2

xdhmoore
xdhmoore

Reputation: 9876

Could you use the Range Http header, if the server supports Range headers, to tell the server to only send back part of the response?

Upvotes: 0

Related Questions