-
Notifications
You must be signed in to change notification settings - Fork 440
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
Http client add url support #833
Changes from 8 commits
379204e
3ccc3bf
d4a13cb
b68a259
481d4b4
281e257
2a8b9a8
e137175
9d28920
f11c94d
fe2c73e
0ea406e
357f879
6ecbebf
9257924
2be9bd5
365e18d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,8 +227,11 @@ class HttpClient | |
{ | ||
public: | ||
virtual std::shared_ptr<Session> CreateSession(nostd::string_view host, | ||
uint16_t port = 80) noexcept = 0; | ||
virtual bool CancelAllSessions() noexcept = 0; | ||
uint16_t port) noexcept = 0; | ||
|
||
virtual std::shared_ptr<Session> CreateSession(nostd::string_view url) noexcept = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I see what you are doing. But I am not sure - maybe we should just deprecate the old method? I think this new one is much better. If we look at Javascript API for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes exactly, I just overloaded the function because that is what the @lalitb (the original issue creator) said might have been good. If its alright I can just simply remove the old parameter and just leave the new one since its also consistent with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it makes sense to remove the original method as @maxgolov suggested. |
||
|
||
virtual bool CancelAllSessions() noexcept = 0; | ||
|
||
virtual bool FinishAllSessions() noexcept = 0; | ||
|
||
|
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.
Do we still need the port parameter here, if the URL itself can contain scheme and port?
Should we rename the
host
parameter tourl
oruri
?