private URI buildRequestURI ( String pathFragment , List < ? extends NameValuePair > params ) { try { String queryString = "" ; if ( params != null && ! params . isEmpty ( ) ) { queryString = "?" + URLEncodedUtils . format ( params , "UTF-8" ) ; } URI fullURI = new URI ( LRSUrl + pathFragment + queryString ) ; return fullURI ; } catch ( URISyntaxException e ) { throw new RuntimeException ( "Error creating request URI" , e ) ; } }
Build a URI for the REST request .