diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx index 9a287503f..6f041af7e 100644 --- a/src/lib/curl/Request.cxx +++ b/src/lib/curl/Request.cxx @@ -45,6 +45,13 @@ #include +CurlRequest::CurlRequest(CurlGlobal &_global, CurlEasy _easy, + CurlResponseHandler &_handler) + :global(_global), handler(_handler), easy(std::move(_easy)) +{ + SetupEasy(); +} + CurlRequest::CurlRequest(CurlGlobal &_global, CurlResponseHandler &_handler) :global(_global), handler(_handler) diff --git a/src/lib/curl/Request.hxx b/src/lib/curl/Request.hxx index 67785b1df..fae401a4e 100644 --- a/src/lib/curl/Request.hxx +++ b/src/lib/curl/Request.hxx @@ -67,9 +67,9 @@ class CurlRequest final { bool registered = false; public: - /** - * To start sending the request, call Start(). - */ + CurlRequest(CurlGlobal &_global, CurlEasy easy, + CurlResponseHandler &_handler); + CurlRequest(CurlGlobal &_global, CurlResponseHandler &_handler);