mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-23 10:52:15 +00:00
Http: consolidate get_host_from_url() into Http class
Move duplicate get_host_from_url() implementations from ElegooLink and OctoPrint into Http as a static method using the curl_url API. This eliminates code duplication and provides a single reliable URL host extraction utility for all print host implementations. Signed-off-by: Igor Mammedov <niallain@gmail.com>
This commit is contained in:
@@ -185,7 +185,7 @@ std::string CrealityPrint::safe_filename(const std::string &filename) const
|
||||
void CrealityPrint::start_print(const std::string &filename) const
|
||||
{
|
||||
try {
|
||||
std::string host = m_host;
|
||||
std::string host = Http::get_host_from_url(m_host);
|
||||
auto const port = "9999";
|
||||
|
||||
json j2 = {
|
||||
|
||||
Reference in New Issue
Block a user