-
-
Notifications
You must be signed in to change notification settings - Fork 746
force option to attempt http2 #325
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #325 +/- ##
==========================================
- Coverage 95.64% 95.48% -0.16%
==========================================
Files 9 9
Lines 1195 1197 +2
==========================================
Hits 1143 1143
- Misses 30 31 +1
- Partials 22 23 +1
Continue to review full report at Codecov.
|
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.
@golgoth31 Thanks for submitting the PR.
By default Go HTTP client capable of handling HTTP2 and 1.1; what is the problem?
I would like to understand the problem you're trying to solve. How is a clone is solving the problem?
FYI, due to supported API
This PR has failing build https://www.travis-ci.org/github/go-resty/resty/jobs/671228244
Hi, Thank you for your answer.
I wrote a simple main file:
The result is as follow:
As shown, the current resty client is not http/2. For the CI problem, between 1.12 and 1.13, the http2 transport enabling has been changed. I will investigate on that. |
@@ -24,6 +24,8 @@ import ( | |||
"strings" | |||
"sync" | |||
"time" | |||
|
|||
"golang.org/x/net/http2" |
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.
@golgoth31 Thanks for submitting PR. And providing insight into the issue.
golang.org/x/net/http2
package is part of the language since go1.6. So externally referring is not required.
I will investigate http2 and address it. Thanks again.
@golgoth31 Just now I have analyzed it using your code snippet.
Results are - |
@golgoth31 Closing this PR in-favor of #339 |
Resty does not use http2 golang conn. Forcing attempt option in transport allow resty to use http2