From 5d7ff150ddcaa578cf2b718ac7a70fa292754ad5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 4 Dec 2020 10:12:30 +0100 Subject: curl/Request: add more wrapper methods --- src/lib/curl/Request.hxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/lib') diff --git a/src/lib/curl/Request.hxx b/src/lib/curl/Request.hxx index baca4fb8e..ef6ef02c9 100644 --- a/src/lib/curl/Request.hxx +++ b/src/lib/curl/Request.hxx @@ -130,6 +130,22 @@ public: easy.SetURL(url); } + void SetRequestHeaders(struct curl_slist *request_headers) { + easy.SetRequestHeaders(request_headers); + } + + void SetNoBody(bool value=true) { + easy.SetNoBody(value); + } + + void SetPost(bool value=true) { + easy.SetPost(value); + } + + void SetRequestBody(const void *data, size_t size) { + easy.SetRequestBody(data, size); + } + /** * CurlResponseHandler::OnData() shall throw this to pause the * stream. Call Resume() to resume the transfer. -- cgit v1.2.3