summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-11 17:26:41 +0100
committerMax Kellermann <max@musicpd.org>2018-01-11 17:27:25 +0100
commitbd2cb404244dab113632b0ba543b7511d372045a (patch)
tree7f0a47c743021e46ccc3eb256a88c4af480433c4 /src/lib
parente9a3ff0e70a3a88eb28ebbe9f1a9f4d3fa964e2a (diff)
lib/curl/Easy: add curl_easy_escape() wrapper
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/curl/Easy.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/curl/Easy.hxx b/src/lib/curl/Easy.hxx
index 4867ac0ba..a2f134a77 100644
--- a/src/lib/curl/Easy.hxx
+++ b/src/lib/curl/Easy.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Max Kellermann <max.kellermann@gmail.com>
+ * Copyright (C) 2016-2018 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -87,6 +87,10 @@ public:
if (code != CURLE_OK)
throw std::runtime_error(curl_easy_strerror(code));
}
+
+ char *Escape(const char *string, int length=0) const noexcept {
+ return curl_easy_escape(handle, string, length);
+ }
};
#endif