Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(volo-http): support default target for client #403

Merged
merged 2 commits into from
Apr 7, 2024

Conversation

yukiiiteru
Copy link
Member

Motivation

Sometimes we use HTTP client for a fixed target address, this PR adds default target for client, with which client can build a request without setting the target address and send it directly.

In addition, this PR also adds Target with its builder. With them introduced, client and request builder can use a more elegant way for setting target address.

Solution

  1. Support setting target address for ClientBuilder
  2. Add TargetBuilder which can be set to address or hostname and will be resolved to address finally

This commit adds default target address for client.

In addition, this commit also adds `Target` with its builder.  With
them introduced, client and request builder can use a more elegant
method for setting target address.

Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
@yukiiiteru yukiiiteru requested review from a team as code owners April 7, 2024 09:52
@yukiiiteru yukiiiteru merged commit f6f5c36 into cloudwego:main Apr 7, 2024
13 checks passed
@yukiiiteru yukiiiteru deleted the feat/http-uri branch April 7, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants