This PR adds two new config fields: timeout and connect_timeout. Both of these config fields will be passed to the Http facade when attempting to make any HTTP requests.
To reduce duplication, I've moved the Http client instantiation to a new httpClient method inside a trait.
I've also added a new withRequestExceptionHandling method that can be used to catch any vendor request exceptions and rethrow them as package-specific exceptions. This is a breaking change because if anyone was trying to catch the old exceptions, their code would no longer work.
This PR adds two new config fields:
timeout
andconnect_timeout
. Both of these config fields will be passed to theHttp
facade when attempting to make any HTTP requests.To reduce duplication, I've moved the
Http
client instantiation to a newhttpClient
method inside a trait.I've also added a new
withRequestExceptionHandling
method that can be used to catch any vendor request exceptions and rethrow them as package-specific exceptions. This is a breaking change because if anyone was trying to catch the old exceptions, their code would no longer work.