def request_body(query)
      params = {}

      query.each do |key, value|
        next if value.nil?
        value = value.map(&:to_s).join(' ') if value.is_a? Array
        params[key] = value
      end

      URI.encode_www_form params
    end
def request_body(query)
      params = {}

      query.each do |key, value|
        next if value.nil?
        value = value.map(&:to_s).join(' ') if value.is_a? Array
        params[key] = value
      end

      URI.encode_www_form params
    end
Returns the request body to send for a POST request with the given options.

 @param [Hash] query The POST request's query params.

 @return [String] The request body for the given query params.