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

transport/http: NewExplicitClient #971

Merged
merged 2 commits into from Mar 20, 2020
Merged

transport/http: NewExplicitClient #971

merged 2 commits into from Mar 20, 2020

Conversation

peterbourgon
Copy link
Member

Closes #796, alternative to #916.

Copy link
Member

@basvanbeek basvanbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@LasTshaMAN LasTshaMAN left a 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!

Comment on lines +20 to +24
// 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)

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 ?

Copy link
Member Author

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.

Comment on lines +202 to +206
//
//
//

func makeCreateRequestFunc(method string, target *url.URL, enc EncodeRequestFunc) CreateRequestFunc {

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 ? :)

Copy link
Member Author

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.

@peterbourgon
Copy link
Member Author

Cool, thanks!

@peterbourgon peterbourgon merged commit 6ce524c into master Mar 20, 2020
@peterbourgon peterbourgon deleted the http-client-request branch March 20, 2020 17:08
@sagikazarmark sagikazarmark added this to the v0.11.0 milestone Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chunked transfer encoding
4 participants