lib/berkeley_library/tind/api/api.rb
# Returns a formatted string version of the request, suitable for
# logging or error messages.
#
# @param uri [URI, String] the URI
# @param params [Hash, nil] the query parameters
# @param method [String] the request method
Returns a formatted string version of the request, suitable for
logging or error messages.
Returns a formatted string version of the request suitable for logging or error messages .
def format_request(uri, params = nil, method = 'GET')
          query_string = format_query(params)
          uri = URIs.append(uri, '?', query_string) if query_string
          "#{method} #{uri}"
        end
def format_request ( uri , params = nil , method = 'GET' ) query_string = format_query ( params ) uri = URIs . append ( uri , '?' , query_string ) if query_string "#{method} #{uri}" end
Returns a formatted string version of the request, suitable for
logging or error messages.
Returns a formatted string version of the request suitable for logging or error messages .
uri
None
params
the query parameters
the query parameters
method
the request method
the request method