-
Notifications
You must be signed in to change notification settings - Fork 2
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: initialize client && request #1
base: main
Are you sure you want to change the base?
Conversation
client.go
Outdated
return c | ||
} | ||
|
||
func (c *Client) SetQueryString(query string) *Client { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没实现的地方可以记个 todo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetQueryString 可以给个示例用法吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetQueryString() 是 hertz Request 的原始 API,可以直接转换一下就行https://github.com/cloudwego/hertz/blob/develop/pkg/protocol/request.go#L457
client.go
Outdated
return c | ||
} | ||
|
||
func (c *Client) SetHeader(header, value string) *Client { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有些 header 有 k-[]v的形式,包括上面的query,可以考虑支持下这种数组类型
feat:improve request
feat:add some api
client *client.Client | ||
} | ||
|
||
type ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
middleware 可以不用支持, hertz client 本身就有 mw 能力,可以把 hertz client mw 以配置的形式注入,就别在 封装的这一层再搞一层 Middleware 了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看了下面这个 Middleware 是在用来创建 hertz 的 Request;这块进行不要对外暴露就好,保证easy_http 内部可用就好
Feat/client interface
What type of PR is this?
feat
Check the PR title.
feat: initialize client && request