Skip to content

Commit

Permalink
misc: the beginning of a new era
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishura4 committed Mar 29, 2024
1 parent cc5dd0a commit 5bf5a5a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/dpp/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ json error_response(const std::string& message, http_request_completion_t& rv)
}

void cluster::post_rest(const std::string &endpoint, const std::string &major_parameters, const std::string &parameters, http_method method, const std::string &postdata, json_encode_t callback, const std::string &filename, const std::string &filecontent, const std::string &filemimetype, const std::string &protocol) {
/* NOTE: This is not a memory leak! The request_queue will free the http_request once it reaches the end of its lifecycle */
rest->post_request(std::make_unique<http_request>(endpoint + (!major_parameters.empty() ? "/" : "") + major_parameters, parameters, [endpoint, callback](http_request_completion_t rv) {
json j;
if (rv.error == h_success && !rv.body.empty()) {
Expand Down Expand Up @@ -350,7 +349,6 @@ void cluster::post_rest_multipart(const std::string &endpoint, const std::string
file_mimetypes.push_back(data.mimetype);
}

/* NOTE: This is not a memory leak! The request_queue will free the http_request once it reaches the end of its lifecycle */
rest->post_request(std::make_unique<http_request>(endpoint + (!major_parameters.empty() ? "/" : "") + major_parameters, parameters, [endpoint, callback](http_request_completion_t rv) {
json j;
if (rv.error == h_success && !rv.body.empty()) {
Expand All @@ -369,7 +367,6 @@ void cluster::post_rest_multipart(const std::string &endpoint, const std::string


void cluster::request(const std::string &url, http_method method, http_completion_event callback, const std::string &postdata, const std::string &mimetype, const std::multimap<std::string, std::string> &headers, const std::string &protocol) {
/* NOTE: This is not a memory leak! The request_queue will free the http_request once it reaches the end of its lifecycle */
raw_rest->post_request(std::make_unique<http_request>(url, callback, method, postdata, mimetype, headers, protocol));
}

Expand Down

0 comments on commit 5bf5a5a

Please sign in to comment.