-
Notifications
You must be signed in to change notification settings - Fork 718
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 set scheme client option #30
Conversation
@@ -603,6 +615,12 @@ func (c *Client) execute(req *Request) (*Response, error) { | |||
|
|||
req.Time = time.Now() | |||
c.httpClient.Transport = c.transport | |||
|
|||
if req.RawRequest.URL != nil && req.RawRequest.URL.Scheme == "" { |
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.
Can you please move this complete if
condition to middleware.go#L141?
@aanm Thank you so much for contributing to I have added couple of note, can you please have a look and take care? Also test case please for your scenario. |
@jeevatkm Done |
@aanm Thanks for your effort, I appreciate it. Travis CI check didn't pass, added a not for URL and test case. |
|
||
SetScheme("http") | ||
|
||
assertEqual(t, true, DefaultClient.scheme == "true") |
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.
this line may be -
assertEqual(t, true, DefaultClient.scheme == "http")
Signed-off-by: André Martins <[email protected]>
@jeevatkm Fixed |
@aanm Thanks, this is helpful for community.
If you're interested, please add example too for community. I'm glad to this PR and your upcoming examples. |
@aanm Would you be interested in providing example for Like creating an |
Signed-off-by: André Martins [email protected]