2

I'm using htmlunit to make some tests but I don't want them to use all my available bandwidth. How can I set a limit on upload/download speed?

I have found I can get an InputStream from a WebResponse. I think this could be used to limit download speed, if I wait some time between reads. But what about upload? I have found no equivalent OutputStream in the API. Thanks.

1 Answers1

1

I'm not sure if this fits your needs but to control network traffic I setup a local proxy server and you can have htmlunit use the proxy. Within that proxy you can control bandwidth and many other options.

Hope that help.

Lostsoul
  • 25,013
  • 48
  • 144
  • 239