public static String replacePathParam ( final String url , final String param , final String value ) throws EncoderException { final String pathParam = param . startsWith ( "{" ) ? param : "{" + param + "}" ; final String encodedValue = encode ( value ) ; return StringUtils . replace ( url , pathParam , encodedValue ) ; }
Replaces path param in uri to a valid encoded value