summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <mk@cm4all.com>2020-12-04 10:12:30 +0100
committerMax Kellermann <max@musicpd.org>2020-12-15 16:56:20 +0100
commit5d7ff150ddcaa578cf2b718ac7a70fa292754ad5 (patch)
treee6cbf6866a27078152f65ec74722086fec68a9c7 /src
parentc767501c12996c10fb88e4fecf19df8051b86a45 (diff)
curl/Request: add more wrapper methods
Diffstat (limited to 'src')
-rw-r--r--src/lib/curl/Request.hxx16
1 files changed, 16 insertions, 0 deletions
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.