private URI toURI ( String endpoint ) throws IllegalArgumentException { if ( endpoint . contains ( "://" ) == false ) { endpoint = Protocol . HTTPS + "://" + endpoint ; } try { return new URI ( endpoint ) ; } catch ( URISyntaxException e ) { throw new IllegalArgumentException ( e ) ; } }
Returns the endpoint as a URI .