lib/curl/Request: add constructor with CurlEasy parameter

This commit is contained in:
Max Kellermann 2021-12-07 12:00:45 +01:00
parent 9e18aafccc
commit cdcef49eef
2 changed files with 10 additions and 3 deletions

View File

@ -45,6 +45,13 @@
#include <string.h>
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)

View File

@ -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);