diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-11 17:26:41 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-17 23:02:49 +0200 |
commit | 147872fe9778b7019dcde72a14b1a667b950e422 (patch) | |
tree | a2ece823d4b65186525c8462eee6979fbe64a3b4 /src/lib/curl | |
parent | 38edb580540119b103e9c4ad9979e7b99e425dd2 (diff) |
lib/curl/Easy: add curl_easy_escape() wrapper
Diffstat (limited to 'src/lib/curl')
-rw-r--r-- | src/lib/curl/Easy.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/curl/Easy.hxx b/src/lib/curl/Easy.hxx index 0e51b159c..b6f0281e4 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 @@ -86,6 +86,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 |