0

I'm using cpp-netlib (v0.11.0) to send HTTP requests.

I'd like to know if it's possible to alter the timeout period when sending an HTTP POST request.

I'm running some unit tests, one of which sends an HTTP request to an address where there is no server running. An attempt to pull information from the response times-out after about 90s with the error "Operation timed out".

ksl
  • 4,519
  • 11
  • 65
  • 106

1 Answers1

1

When the constructor for the client class is invoked, you can pass an options class that you can set the timeout in. See the docs for the client class constructors (and then scroll down a bit) for more specific information.

randomusername
  • 7,927
  • 23
  • 50
  • Thanks. Support for request timeouts was added in v0.11.1. That's why I missed it. – ksl Apr 29 '15 at 18:53