def request(verb, path, params = {}, options = {})
      started_at = Time.now
      filter = @filter_params + (options[:filter_params] || []).map { |p| p.to_s }
      log_level = options[:log_level] || :info
      request_uuid = options[:request_uuid] || RightSupport::Data::UUID.generate
      connect_options, request_options = @http_client.options(verb, path, params, request_headers(request_uuid, options), options)

      Log.send(log_level, "Requesting #{verb.to_s.upcase} <#{request_uuid}> " + log_text(path, params, filter))

      used = {}
      result, code, body, headers = if verb != :poll
        rest_request(verb, path, connect_options, request_options, used)
      else
        poll_request(path, connect_options, request_options, options[:request_timeout], started_at, used)
      end

      log_success(result, code, body, headers, used[:host], path, request_uuid, started_at, log_level)
      result
    rescue RightSupport::Net::NoResult => e
      handle_no_result(e, used[:host]) do |e2|
        log_failure(used[:host], path, params, filter, request_uuid, started_at, e2)
      end
    rescue RestClient::Exception => e
      e2 = HttpExceptions.convert(e)
      log_failure(used[:host], path, params, filter, request_uuid, started_at, e2)
      raise e2
    rescue StandardError => e
      log_failure(used[:host], path, params, filter, request_uuid, started_at, e)
      raise
    end
def request(verb, path, params = {}, options = {})
      started_at = Time.now
      filter = @filter_params + (options[:filter_params] || []).map { |p| p.to_s }
      log_level = options[:log_level] || :info
      request_uuid = options[:request_uuid] || RightSupport::Data::UUID.generate
      connect_options, request_options = @http_client.options(verb, path, params, request_headers(request_uuid, options), options)

      Log.send(log_level, "Requesting #{verb.to_s.upcase} <#{request_uuid}> " + log_text(path, params, filter))

      used = {}
      result, code, body, headers = if verb != :poll
        rest_request(verb, path, connect_options, request_options, used)
      else
        poll_request(path, connect_options, request_options, options[:request_timeout], started_at, used)
      end

      log_success(result, code, body, headers, used[:host], path, request_uuid, started_at, log_level)
      result
    rescue RightSupport::Net::NoResult => e
      handle_no_result(e, used[:host]) do |e2|
        log_failure(used[:host], path, params, filter, request_uuid, started_at, e2)
      end
    rescue RestClient::Exception => e
      e2 = HttpExceptions.convert(e)
      log_failure(used[:host], path, params, filter, request_uuid, started_at, e2)
      raise e2
    rescue StandardError => e
      log_failure(used[:host], path, params, filter, request_uuid, started_at, e)
      raise
    end
Make HTTP request
 If polling, continue to poll until receive data, timeout, or hit error
 Encode request parameters and response using JSON
 Apply configured authorization scheme
 Log request/response with filtered parameters included for failure or debug mode

 @param [Symbol] verb for HTTP REST request
 @param [String] path in URI for desired resource
 @param [Hash] params for HTTP 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 [String] :request_uuid uniquely identifying request; defaults to random generated UUID
 @option options [Array] :filter_params symbols or strings for names of request parameters whose
   values are to be hidden when logging in addition to the ones provided during object initialization;
   also applied to contents of any parameters named :payload
 @option options [Hash] :headers to be added to request
 @option options [Numeric] :poll_timeout maximum wait for individual poll; defaults to :request_timeout
 @option options [Symbol] :log_level to use when logging information about the request other than errors;
   defaults to :info

 @return [Object] result returned by receiver of request

 @raise [NotResponding] server not responding, recommend retry
 @raise [HttpException] HTTP failure with associated status code