def options(verb, path, params, request_headers, options)
      request_options = {
        :open_timeout => options[:open_timeout] || BalancedHttpClient::DEFAULT_OPEN_TIMEOUT,
        :timeout => options[:poll_timeout] || options[:request_timeout] || BalancedHttpClient::DEFAULT_REQUEST_TIMEOUT,
        :headers => request_headers }

      if [:get, :delete].include?(verb)
        # Doing own formatting because :query option for HTTPClient uses addressable gem
        # for conversion and that gem encodes arrays in a Rails-compatible fashion without []
        # markers and that is inconsistent with what sinatra expects
        request_options[:query] = "?#{BalancedHttpClient.format(params)}" if params.is_a?(Hash) && params.any?
      else
        request_options[:payload] = JSON.dump(params)
        request_options[:headers][:content_type] = "application/json"
      end
      [{}, request_options]
    end
def options(verb, path, params, request_headers, options)
      request_options = {
        :open_timeout => options[:open_timeout] || BalancedHttpClient::DEFAULT_OPEN_TIMEOUT,
        :timeout => options[:poll_timeout] || options[:request_timeout] || BalancedHttpClient::DEFAULT_REQUEST_TIMEOUT,
        :headers => request_headers }

      if [:get, :delete].include?(verb)
        # Doing own formatting because :query option for HTTPClient uses addressable gem
        # for conversion and that gem encodes arrays in a Rails-compatible fashion without []
        # markers and that is inconsistent with what sinatra expects
        request_options[:query] = "?#{BalancedHttpClient.format(params)}" if params.is_a?(Hash) && params.any?
      else
        request_options[:payload] = JSON.dump(params)
        request_options[:headers][:content_type] = "application/json"
      end
      [{}, request_options]
    end
Initialize client

 @option options [String] :api_version for X-API-Version header
 @option options [String] :health_check_path in URI for health check resource;
   defaults to DEFAULT_HEALTH_CHECK_PATH
 Construct options for HTTP request

 @param [Symbol] verb for HTTP REST request
 @param [String] path in URI for desired resource (ignored)
 @param [Hash] params for HTTP request
 @param [String] request_headers to be applied to request

 @option options [Numeric] :open_timeout maximum wait for connection; defaults to DEFAULT_OPEN_TIMEOUT
 @option options [Numeric] :request_timeout maximum wait for response; defaults to DEFAULT_REQUEST_TIMEOUT
 @option options [Numeric] :poll_timeout maximum wait for individual poll; defaults to :request_timeout

 @return [Array] connect and request option hashes