ESPHome 2025.9.0
Loading...
Searching...
No Matches
http_request_host.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_HOST
4#include "http_request.h"
5namespace esphome {
6namespace http_request {
7
8class HttpRequestHost;
10 public:
11 int read(uint8_t *buf, size_t max_len) override;
12 void end() override;
13
14 protected:
15 friend class HttpRequestHost;
16 std::vector<uint8_t> response_body_{};
17};
18
20 public:
21 std::shared_ptr<HttpContainer> perform(std::string url, std::string method, std::string body,
22 std::list<Header> request_headers,
23 std::set<std::string> response_headers) override;
24 void set_ca_path(const char *ca_path) { this->ca_path_ = ca_path; }
25
26 protected:
27 const char *ca_path_{};
28};
29
30} // namespace http_request
31} // namespace esphome
32
33#endif // USE_HOST
int read(uint8_t *buf, size_t max_len) override
std::shared_ptr< HttpContainer > perform(std::string url, std::string method, std::string body, std::list< Header > request_headers, std::set< std::string > response_headers) override
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7