curl/Request: add more wrapper methods

This commit is contained in:
Max Kellermann 2020-12-04 10:12:30 +01:00 committed by Max Kellermann
parent c767501c12
commit 5d7ff150dd

View File

@ -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.