Skip to content
New issue

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

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

Already on GitHub? # to your account

ghttp: Can support setting default values ​​for header? #4078

Open
nilsir opened this issue Dec 25, 2024 · 2 comments
Open

ghttp: Can support setting default values ​​for header? #4078

nilsir opened this issue Dec 25, 2024 · 2 comments
Labels
feature help wanted planned This issue/proposal is planned into our next steps.

Comments

@nilsir
Copy link

nilsir commented Dec 25, 2024

Is your feature request related to a problem?

Option Yes

Describe the solution you'd like

I want to set a default value when the header information is empty

Describe alternatives you've considered

# now is 
language := r.GetHeader("lang")
if language == "" {
    language = "zh-CN"
}

# replace is
r.GetHeader("lang", "zh-CN") 

Additional

No response

@nilsir nilsir added the feature label Dec 25, 2024
@gqcn
Copy link
Member

gqcn commented Dec 26, 2024

Good proposal!

@gqcn gqcn added help wanted planned This issue/proposal is planned into our next steps. labels Dec 26, 2024
Copy link

Hello @nilsir. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!
你好 @nilsir。我们喜欢您的提案/反馈,并希望您或其他社区成员通过拉取请求做出贡献。我们提前感谢您的贡献,并期待对其进行审查。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature help wanted planned This issue/proposal is planned into our next steps.
Projects
None yet
Development

No branches or pull requests

2 participants