Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Coenen <manuel@duet3d.com>2020-06-04 12:20:09 +0300
committerManuel Coenen <manuel@duet3d.com>2020-06-04 12:20:09 +0300
commit06e329655d94659239e503861ef9b81fd8440c98 (patch)
treecdd2ae4de44e24d50bc2a6eef86d263e776d0f79 /src/slic3r/Utils/Http.hpp
parent1e5d1cb616742ef64070ae93d8acf3c722612993 (diff)
Add support for DuetSoftwareFramework based machines
Also extend Http to be able to send PUT requests as well as setting POST body data directly.
Diffstat (limited to 'src/slic3r/Utils/Http.hpp')
-rw-r--r--src/slic3r/Utils/Http.hpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/slic3r/Utils/Http.hpp b/src/slic3r/Utils/Http.hpp
index f16236279..1ee47606e 100644
--- a/src/slic3r/Utils/Http.hpp
+++ b/src/slic3r/Utils/Http.hpp
@@ -49,6 +49,7 @@ public:
// for a GET and a POST request respectively.
static Http get(std::string url);
static Http post(std::string url);
+ static Http put(std::string url);
~Http();
Http(const Http &) = delete;
@@ -80,6 +81,16 @@ public:
// This can be used for hosts which do not support multipart requests.
Http& set_post_body(const boost::filesystem::path &path);
+ // Set the POST request body.
+ // The data is used verbatim, it is not additionally encoded in any way.
+ // This can be used for hosts which do not support multipart requests.
+ Http& set_post_body(const std::string body);
+
+ // Set the file contents as a PUT request body.
+ // The data is used verbatim, it is not additionally encoded in any way.
+ // This can be used for hosts which do not support multipart requests.
+ Http& set_put_body(const boost::filesystem::path &path);
+
// Callback called on HTTP request complete
Http& on_complete(CompleteFn fn);
// Callback called on an error occuring at any stage of the requests: Url parsing, DNS lookup,
@@ -100,7 +111,7 @@ public:
// Tells whether current backend supports seting up a CA file using ca_file()
static bool ca_file_supported();
-
+
// Return empty string on success or error message on fail.
static std::string tls_global_init();
static std::string tls_system_cert_store();