5#if defined(USE_ARDUINO) && !defined(USE_ESP32)
12#include <ESP8266HTTPClient.h>
13#ifdef USE_HTTP_REQUEST_ESP8266_HTTPS
14#include <WiFiClientSecure.h>
20class HttpRequestArduino;
34 int read(uint8_t *buf,
size_t max_len)
override;
42 int read_chunked_(uint8_t *buf,
size_t max_len, WiFiClient *stream);
51 std::shared_ptr<HttpContainer>
perform(
const std::string &url,
const std::string &method,
const std::string &body,
52 const std::vector<Header> &request_headers,
53 const std::vector<std::string> &lower_case_collect_headers)
override;
int read_chunked_(uint8_t *buf, size_t max_len, WiFiClient *stream)
Decode chunked transfer encoding from the raw stream.
size_t chunk_remaining_
Bytes remaining in current chunk.
ChunkedState chunk_state_
int read(uint8_t *buf, size_t max_len) override
void chunk_header_complete_()
Transition from chunk header to data or trailer based on parsed size.
std::shared_ptr< HttpContainer > perform(const std::string &url, const std::string &method, const std::string &body, const std::vector< Header > &request_headers, const std::vector< std::string > &lower_case_collect_headers) override
@ COMPLETE
All content has been read, caller should exit loop.
ChunkedState
State machine for decoding chunked transfer encoding on Arduino.
@ CHUNK_DATA
Reading chunk data bytes.
@ CHUNK_HEADER
Reading hex digits of chunk size.
@ CHUNK_HEADER_EXT
Skipping chunk extensions until .
@ CHUNK_DATA_TRAIL
Skipping \r after chunk data.
@ CHUNK_TRAILER
Consuming trailer headers after final 0-size chunk.