Throw exception if HTTP request returns an error.
Add property for configuring CURLOPT_TIMEOUT option.