private < TResponse > TResponse callApi ( HttpMethod method , BasicCredentials credentials , String path , Map < String , String > queryParams , Object requestBody , Class < TResponse > responseClass ) throws AuthleteApiException { // Create a connection to the Authlete API. HttpURLConnection con = createConnection ( method , credentials , mBaseUrl , path , queryParams , mSettings ) ; try { // Communicate with the API and get a response. return communicate ( con , requestBody , responseClass ) ; } finally { // Disconnect the connection in any case. con . disconnect ( ) ; } }
Call an API .