1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-14 17:22:20 +01:00

Add support for custom request headers in online_image component (#8985)

This commit is contained in:
Stanislav Meduna
2025-06-11 12:14:02 +02:00
committed by GitHub
parent e8aa7cff36
commit 052f558131
4 changed files with 26 additions and 0 deletions

View File

@@ -143,6 +143,10 @@ void OnlineImage::update() {
headers.push_back(accept_header);
for (auto &header : this->request_headers_) {
headers.push_back(http_request::Header{header.first, header.second.value()});
}
this->downloader_ = this->parent_->get(this->url_, headers, {ETAG_HEADER_NAME, LAST_MODIFIED_HEADER_NAME});
if (this->downloader_ == nullptr) {