private String mapToFogbugzUrl ( Map < String , String > params ) throws UnsupportedEncodingException { String output = this . getFogbugzUrl ( ) ; for ( String key : params . keySet ( ) ) { String value = params . get ( key ) ; if ( ! value . isEmpty ( ) ) { output += "&" + URLEncoder . encode ( key , "UTF-8" ) + "=" + URLEncoder . encode ( value , "UTF-8" ) ; } } FogbugzManager . log . info ( "Generated URL to send to Fogbugz: " + output ) ; return output ; }
Helper method to create API url from Map with proper encoding .