Changed http client to be instanciated by services
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Http
|
||||
};
|
||||
|
||||
Priority priority {Priority::Normal};
|
||||
std::string url;
|
||||
std::string relativeUrl; // relative to baseUrl used by the client
|
||||
|
||||
using OnSuccessFunc = std::function<void(std::string_view msgBody)>;
|
||||
OnSuccessFunc onSuccessFunc;
|
||||
|
||||
@@ -35,6 +35,6 @@ namespace Http
|
||||
virtual void sendPOSTRequest(ClientPOSTRequestParameters&& request) = 0;
|
||||
};
|
||||
|
||||
std::unique_ptr<IClient> createClient(boost::asio::io_context& ioContext);
|
||||
std::unique_ptr<IClient> createClient(boost::asio::io_context& ioContext, std::string_view baseUrl);
|
||||
} // namespace Http
|
||||
|
||||
|
||||
Reference in New Issue
Block a user