[http_request] Allow configure buffer size on ESP-IDF (#7125)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
dentra
2024-07-24 06:50:59 +03:00
committed by GitHub
parent da10de9ea8
commit 1f3754684a
3 changed files with 30 additions and 0 deletions

View File

@@ -18,6 +18,12 @@ namespace http_request {
static const char *const TAG = "http_request.idf";
void HttpRequestIDF::dump_config() {
HttpRequestComponent::dump_config();
ESP_LOGCONFIG(TAG, " Buffer Size RX: %u", this->buffer_size_rx_);
ESP_LOGCONFIG(TAG, " Buffer Size TX: %u", this->buffer_size_tx_);
}
std::shared_ptr<HttpContainer> HttpRequestIDF::start(std::string url, std::string method, std::string body,
std::list<Header> headers) {
if (!network::is_connected()) {
@@ -63,6 +69,9 @@ std::shared_ptr<HttpContainer> HttpRequestIDF::start(std::string url, std::strin
config.user_agent = this->useragent_;
}
config.buffer_size = this->buffer_size_rx_;
config.buffer_size_tx = this->buffer_size_tx_;
const uint32_t start = millis();
watchdog::WatchdogManager wdm(this->get_watchdog_timeout());