public String getRequestParams(Request request) {
        StringBuilder params = new StringBuilder();
        if (request != null && request.getUrlParams() != null) {
            params.append("?");
            for (String key : request.getUrlParams().keySet()) {
                params.append(key);
                params.append("=");
                params.append(String.valueOf(request.getUrlParams().get(key)));
                params.append("&");
            }
            params.deleteCharAt(params.length() - 1);
        }
        return params.toString();
    }
public String getRequestParams ( Request request ) { StringBuilder params = new StringBuilder ( ) ; if ( request != null && request . getUrlParams ( ) != null ) { params . append ( "?" ) ; for ( String key : request . getUrlParams ( ) . keySet ( ) ) { params . append ( key ) ; params . append ( "=" ) ; params . append ( String . valueOf ( request . getUrlParams ( ) . get ( key ) ) ) ; params . append ( "&" ) ; } params . deleteCharAt ( params . length ( ) - 1 ) ; } return params . toString ( ) ; }
Returns a string representation of the parameters, able to be appended to the url

@param request - the parameters to be passed to the endpoint for the service
call
@return String: the string friendly url parameter representation