@Override
    public <RequestType extends Request> AnnotatedText perform(String endpoint, RequestType request) throws HttpRosetteAPIException {
        try {
            return sendPostRequest(request, urlBase + endpoint, AnnotatedText.class);
        } catch (IOException e) {
            throw new RosetteRuntimeException("IO Exception communicating with the Rosette API", e);
        } catch (URISyntaxException e) {
            throw new RosetteRuntimeException("Invalid URI", e);
        }
    }
@ Override public < RequestType extends Request > AnnotatedText perform ( String endpoint , RequestType request ) throws HttpRosetteAPIException { try { return sendPostRequest ( request , urlBase + endpoint , AnnotatedText . class ) ; } catch ( IOException e ) { throw new RosetteRuntimeException ( "IO Exception communicating with the Rosette API" , e ) ; } catch ( URISyntaxException e ) { throw new RosetteRuntimeException ( "Invalid URI" , e ) ; } }
@param endpoint which endpoint.
@param request the data for the request.
@param <RequestType> the type of the request object.
@return the response, {@link com.basistech.rosette.dm.AnnotatedText}.
@throws HttpRosetteAPIException for an error returned from the Rosette API.
@throws RosetteRuntimeException for other errors, such as communications problems with HTTP.