Pass in a callable to $defaultOptions that returns an array of CURLOPT_* values to start
off a request with, or an flat array with the same format used by curl_setopt_array() to
provide a static set of options. Note that many options are overridden later in the request
call, including timeouts, which can be set via setTimeout() and setConnectTimeout().
Note that request() will silently ignore a non-callable, non-array $defaultOptions, and will
throw an exception if $defaultOptions returns a non-array value.