mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-08-31 00:02:03 +02:00
allow whitespaces for duet upload
* now url_encoding characters which could not used for URLs
This commit is contained in:
@@ -421,6 +421,18 @@ bool Http::ca_file_supported()
|
||||
return res;
|
||||
}
|
||||
|
||||
std::string Http::url_encode(const std::string &str)
|
||||
{
|
||||
::CURL *curl = ::curl_easy_init();
|
||||
char *ce = ::curl_easy_escape(curl, str.c_str(), str.length());
|
||||
std::string encoded = std::string(ce);
|
||||
|
||||
::curl_free(ce);
|
||||
if (curl != nullptr) { ::curl_easy_cleanup(curl); }
|
||||
|
||||
return encoded;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream &os, const Http::Progress &progress)
|
||||
{
|
||||
os << "Http::Progress("
|
||||
|
||||
Reference in New Issue
Block a user