HttpClient getting started guide - #46
Open
ok2c wants to merge 1 commit into
Open
Conversation
ok2c
force-pushed
the
httpclient-getting-started
branch
from
August 23, 2026 08:41
9253398 to
be3352b
Compare
Member
Author
|
@michael-o @arturobernalg @rschmitt @garydgregory Please let me know if you find anything objectionable or wrong. Feel free to correct my English. |
michael-o
requested changes
Aug 23, 2026
arturobernalg
requested changes
Aug 23, 2026
| execution. The execution context maanged by HttpClient is represented by the | ||
| `HttpClientContext` class, which basically acts a holder of various attributes that can | ||
| be set prior to request execution, updated in the course of the request execution and | ||
| the response processing, and iterragated upon the message exchange completion. |
| - Async support for 103 Early Hints via a pluggable | ||
| - Optional Observability nodule with Micrometer / OpenTelemetry support for request timers/counters, | ||
| - Async support for 103 Early Hints via a pluggable strategy | ||
| - Optional Observability nodule with Micrometer / OpenTelemetry support for request |
| .build(); | ||
| // Provide request custom settings | ||
| localContext.setRequestConfig(RequestConfig.custom() | ||
| .setCookieSpec(CookieSpecs.STANDARD_STRICT) |
Member
There was a problem hiding this comment.
this shouldn't be setCookieSpec(StandardCookieSpec.STRICT) ??
| import org.apache.http.client.config.CookieSpecs; | ||
|
|
||
|
|
||
| public class AsyncHttpClientContextExample { |
Member
There was a problem hiding this comment.
The async client must be started before request execution; otherwise these examples fail with CancellationException: Request execution cancelled.
ok2c
force-pushed
the
httpclient-getting-started
branch
from
August 23, 2026 15:59
7b6af3d to
f9a3816
Compare
ok2c
force-pushed
the
httpclient-getting-started
branch
from
August 23, 2026 15:59
f9a3816 to
afd88f3
Compare
Member
Author
|
Thank you @michael-o and @arturobernalg! Please do another pass. |
michael-o
requested changes
Aug 23, 2026
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-jdk14</artifactId> | ||
| <version>${slf4j.version}</version> | ||
| </dependency> |
| return CONN_MANAGER; | ||
| } | ||
| ``` | ||
| Please note Connection manager and HttpClient instances are made static for simplicity. |
|
|
||
| * Classic HttpClient | ||
|
|
||
| Please note classic request and entity objects are not thread-safe. They must not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.