lib/curl/Easy: add curl_easy_escape() wrapper

This commit is contained in:
Max Kellermann 2018-01-11 17:26:41 +01:00
parent e9a3ff0e70
commit bd2cb40424

View File

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