@Override public HttpResponse sendRequestImpl(HttpUriRequest request) throws IOException { SyncHttpResponseCallback callback = new SyncHttpResponseCallback(request); this.client.execute(request, callback); try { callback.await(); if (callback.getException() != null) { throw new IOException(callback.getException()); } return callback.getResponse(); } catch (InterruptedException e) { throw new IOException(e); } }
@Override public HttpResponse sendRequestImpl(HttpUriRequest request) throws IOException { SyncHttpResponseCallback callback = new SyncHttpResponseCallback(request); this.client.execute(request, callback); try { callback.await(); if (callback.getException() != null) { throw new IOException(callback.getException()); } return callback.getResponse(); } catch (InterruptedException e) { throw new IOException(e); } }