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

Add Doer interface and setter #21

Closed
wants to merge 3 commits into from
Closed

Add Doer interface and setter #21

wants to merge 3 commits into from

Conversation

ansel1
Copy link

@ansel1 ansel1 commented Jul 14, 2016

Replaced use of *http.Client with interface Doer. Allows use of client-side middleware by wrapping *http.Client before passing to Sling.

// Sling is an HTTP Request builder and sender.
type Sling struct {
// http Client for doing requests
httpClient *http.Client
doer Doer
Copy link
Owner

Choose a reason for hiding this comment

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

let's just keep the unexported variable called httpClient or client since that still reflects its purpose when reading through

Copy link
Owner

Choose a reason for hiding this comment

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

^

@dghubble
Copy link
Owner

dghubble commented Jul 17, 2016

Thanks! Can you split out the indent feature into a separate PR and remove the merge commit please?

@ansel1 ansel1 changed the title Doer/MarshalIndent Doer Jul 17, 2016
@ansel1
Copy link
Author

ansel1 commented Jul 17, 2016

Sorry, I meant to clean up the history. Not sure how that merge commit crept in there. This PR now just contains the doer change.

@dghubble
Copy link
Owner

There are some comments on the outdated diffs as well.

@ansel1
Copy link
Author

ansel1 commented Jul 18, 2016

I didn't understand the comment "apply this change in the previous commit". Maybe this doesn't apply since the commit history was revised?

@dghubble dghubble changed the title Doer Add Doer interface and setter Jul 23, 2016
@dghubble
Copy link
Owner

Squashed and merged as 4b482f9

@dghubble dghubble closed this Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants