-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
transport/http: NewExplicitClient #971
Conversation
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.
LGTM
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.
LGTM! Great job, thx!
// CreateRequestFunc creates an outgoing HTTP request based on the passed | ||
// request object. It's designed to be used in HTTP clients, for client-side | ||
// endpoints. It's a more powerful version of EncodeRequestFunc, and can be used | ||
// if more fine-grained control of the HTTP request is required. | ||
type CreateRequestFunc func(context.Context, interface{}) (*http.Request, error) |
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.
Don't you want to mark EncodeRequestFunc
as // deprecated
linking this issue for more information ?
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.
No, because I don't consider it deprecated, this is just an alternative.
// | ||
// | ||
// | ||
|
||
func makeCreateRequestFunc(method string, target *url.URL, enc EncodeRequestFunc) CreateRequestFunc { |
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.
Maybe add some meaningful comments here instead ? :)
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.
It's an unexported function, and I find it pretty self-explanatory.
Cool, thanks! |
Closes #796, alternative to #916.