From 10e411f8c1ae989dadc69a30626d9fdbb5ffaa46 Mon Sep 17 00:00:00 2001 From: Nikolay Vasilchuk Date: Tue, 21 Jul 2020 23:26:21 +0300 Subject: [PATCH] http_request fix urls caching (#1174) * Fix cache * CI Fix Co-authored-by: Nikolay Vasilchuk --- esphome/components/http_request/http_request.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/http_request/http_request.cpp b/esphome/components/http_request/http_request.cpp index 390867c948..46b0910b5e 100644 --- a/esphome/components/http_request/http_request.cpp +++ b/esphome/components/http_request/http_request.cpp @@ -15,15 +15,15 @@ void HttpRequestComponent::dump_config() { void HttpRequestComponent::send() { bool begin_status = false; this->client_.setReuse(true); - static const String URL = this->url_.c_str(); + const String url = this->url_.c_str(); #ifdef ARDUINO_ARCH_ESP32 - begin_status = this->client_.begin(URL); + begin_status = this->client_.begin(url); #endif #ifdef ARDUINO_ARCH_ESP8266 #ifndef CLANG_TIDY this->client_.setFollowRedirects(true); this->client_.setRedirectLimit(3); - begin_status = this->client_.begin(*this->get_wifi_client_(), URL); + begin_status = this->client_.begin(*this->get_wifi_client_(), url); #endif #endif