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".

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. Support for request timeouts was added in v0.11.1. That's why I missed it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.