static ConfirmSubscriptionResult confirmSubscription ( HttpClient httpClient , String subscribeUrl ) { try { HttpGet request = new HttpGet ( subscribeUrl ) ; HttpResponse response = httpClient . execute ( request ) ; if ( ApacheUtils . isRequestSuccessful ( response ) ) { return new StaxResponseHandler < ConfirmSubscriptionResult > ( ConfirmSubscriptionResultStaxUnmarshaller . getInstance ( ) ) . handle ( ApacheUtils . createResponse ( null , request , response , null ) ) . getResult ( ) ; } else { throw new HttpException ( "Could not confirm subscription" , response ) ; } } catch ( Exception e ) { throw new SdkClientException ( e ) ; } }
Confirms a subscription by visiting the provided URL .