diff --git a/src/lib/curl/Easy.hxx b/src/lib/curl/Easy.hxx index 67ce8ce33..479f8f530 100644 --- a/src/lib/curl/Easy.hxx +++ b/src/lib/curl/Easy.hxx @@ -119,6 +119,10 @@ public: SetOption(CURLOPT_USERPWD, userpwd); } + void SetUpload(bool value=true) { + SetOption(CURLOPT_UPLOAD, (long)value); + } + void SetNoProgress(bool value=true) { SetOption(CURLOPT_NOPROGRESS, (long)value); } @@ -154,6 +158,13 @@ public: SetOption(CURLOPT_WRITEDATA, userdata); } + void SetReadFunction(size_t (*function)(char *ptr, size_t size, + size_t nmemb, void *userdata), + void *userdata) { + SetOption(CURLOPT_READFUNCTION, function); + SetOption(CURLOPT_READDATA, userdata); + } + void SetNoBody(bool value=true) { SetOption(CURLOPT_NOBODY, (long)value); }