Skip to content

Commit

Permalink
Merge pull request #1947 from zalando/dependabot/maven/org.apache.htt…
Browse files Browse the repository at this point in the history
…pcomponents.client5-httpclient5-5.4.1

Bump org.apache.httpcomponents.client5:httpclient5 from 5.3.1 to 5.4.1
  • Loading branch information
msdousti authored Oct 29, 2024
2 parents e0fa91e + 46d93ef commit 2ce980b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logbook-httpclient5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.3.1</version>
<version>5.4.1</version>
</dependency>
<!-- testing -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.apache.hc.client5.http.async.methods.SimpleResponseConsumer;
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder;
import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.HttpHeaders;
Expand Down Expand Up @@ -55,7 +56,7 @@ protected ClassicHttpResponse sendAndReceive(@Nullable final String body) throws

AtomicReference<String> responseRef = new AtomicReference<>(null);
CountDownLatch latch = new CountDownLatch(1);
HttpResponse response = client.execute(SimpleRequestProducer.create(builder.build()), new LogbookHttpAsyncResponseConsumer<>(SimpleResponseConsumer.create()), getCallback(responseRef, latch)).get();
HttpResponse response = client.execute(SimpleRequestProducer.create(builder.build()), new LogbookHttpAsyncResponseConsumer<>(SimpleResponseConsumer.create()), HttpClientContext.create(), getCallback(responseRef, latch)).get();

BasicClassicHttpResponse httpResponse = new BasicClassicHttpResponse(response.getCode(), response.getReasonPhrase());
latch.await(5, SECONDS);
Expand Down

0 comments on commit 2ce980b

Please sign in to comment.