Merge branch 'http_request_remove_action_maps' into integration

This commit is contained in:
J. Nick Koston
2026-02-16 19:12:54 -06:00

View File

@@ -1,7 +1,6 @@
#pragma once
#include <list>
#include <map>
#include <memory>
#include <set>
#include <utility>
@@ -401,12 +400,12 @@ template<typename... Ts> class HttpRequestSendAction : public Action<Ts...> {
#endif
void add_request_header(const char *key, TemplatableValue<const char *, Ts...> value) {
this->request_headers_.insert({key, value});
this->request_headers_.push_back({key, value});
}
void add_collect_header(const char *value) { this->collect_headers_.push_back(value); }
void add_json(const char *key, TemplatableValue<std::string, Ts...> value) { this->json_.insert({key, value}); }
void add_json(const char *key, TemplatableValue<std::string, Ts...> value) { this->json_.push_back({key, value}); }
void set_json(std::function<void(Ts..., JsonObject)> json_func) { this->json_func_ = json_func; }
@@ -508,9 +507,9 @@ template<typename... Ts> class HttpRequestSendAction : public Action<Ts...> {
}
void encode_json_func_(Ts... x, JsonObject root) { this->json_func_(x..., root); }
HttpRequestComponent *parent_;
std::map<const char *, TemplatableValue<const char *, Ts...>> request_headers_{};
std::vector<std::pair<const char *, TemplatableValue<const char *, Ts...>>> request_headers_{};
std::vector<std::string> collect_headers_{"content-type", "content-length"};
std::map<const char *, TemplatableValue<std::string, Ts...>> json_{};
std::vector<std::pair<const char *, TemplatableValue<std::string, Ts...>>> json_{};
std::function<void(Ts..., JsonObject)> json_func_{nullptr};
#ifdef USE_HTTP_REQUEST_RESPONSE
Trigger<std::shared_ptr<HttpContainer>, std::string &, Ts...> success_trigger_with_response_;