diff --git a/_http_request_8h_source.html b/_http_request_8h_source.html
index 77d83c610..3075c8c0d 100644
--- a/_http_request_8h_source.html
+++ b/_http_request_8h_source.html
@@ -121,290 +121,294 @@
- 65 if (is_chunked_output_active) client_ptr->println(0, HEX);
-
-
-
-
-
-
-
-
+ 65 if (is_chunked_output_active) {
+ 66 client_ptr->println(0, HEX);
+ 67 client_ptr->println();
+
+ 69 is_chunked_output_active =
false;
+
+
+
+
- 77 virtual int post(
Url &url,
const char *mime,
const char *data,
int len = -1) {
- 78 LOGI(
"post %s", url.url());
- 79 return process(POST, url, mime, data, len);
-
-
- 83 virtual int post(
Url &url,
const char *mime,
Stream &data,
int len = -1) {
- 84 LOGI(
"post %s", url.url());
- 85 return process(POST, url, mime, data, len);
-
-
- 89 virtual int put(
Url &url,
const char *mime,
const char *data,
int len = -1) {
- 90 LOGI(
"put %s", url.url());
- 91 return process(PUT, url, mime, data, len);
-
-
- 95 virtual int put(
Url &url,
const char *mime,
Stream &data,
int len = -1) {
- 96 LOGI(
"put %s", url.url());
- 97 return process(PUT, url, mime, data, len);
-
-
- 101 virtual int del(
Url &url,
const char *mime =
nullptr,
- 102 const char *data =
nullptr,
int len = -1) {
- 103 LOGI(
"del %s", url.url());
- 104 return process(DELETE, url, mime, data, len);
-
-
- 108 virtual int get(
Url &url,
const char *acceptMime =
nullptr,
- 109 const char *data =
nullptr,
int len = -1) {
- 110 LOGI(
"get %s", url.url());
- 111 this->accept = acceptMime;
- 112 return process(GET, url,
nullptr, data, len);
-
-
- 116 virtual int head(
Url &url,
const char *acceptMime =
nullptr,
- 117 const char *data =
nullptr,
int len = -1) {
- 118 LOGI(
"head %s", url.url());
- 119 this->accept = acceptMime;
- 120 return process(HEAD, url,
nullptr, data, len);
-
-
-
- 124 virtual int read(uint8_t *str,
int len) {
-
- 126 if (reply_header.isChunked()) {
- 127 return chunk_reader.read(*client_ptr, str, len);
-
- 129 return client_ptr->read(str, len);
-
-
-
- 133 size_t readBytes(uint8_t *str,
size_t len)
override {
- 134 return read(str, len);
+
+
+
+
+ 81 virtual int post(
Url &url,
const char *mime,
const char *data,
int len = -1) {
+ 82 LOGI(
"post %s", url.url());
+ 83 return process(POST, url, mime, data, len);
+
+
+ 87 virtual int post(
Url &url,
const char *mime,
Stream &data,
int len = -1) {
+ 88 LOGI(
"post %s", url.url());
+ 89 return process(POST, url, mime, data, len);
+
+
+ 93 virtual int put(
Url &url,
const char *mime,
const char *data,
int len = -1) {
+ 94 LOGI(
"put %s", url.url());
+ 95 return process(PUT, url, mime, data, len);
+
+
+ 99 virtual int put(
Url &url,
const char *mime,
Stream &data,
int len = -1) {
+ 100 LOGI(
"put %s", url.url());
+ 101 return process(PUT, url, mime, data, len);
+
+
+ 105 virtual int del(
Url &url,
const char *mime =
nullptr,
+ 106 const char *data =
nullptr,
int len = -1) {
+ 107 LOGI(
"del %s", url.url());
+ 108 return process(DELETE, url, mime, data, len);
+
+
+ 112 virtual int get(
Url &url,
const char *acceptMime =
nullptr,
+ 113 const char *data =
nullptr,
int len = -1) {
+ 114 LOGI(
"get %s", url.url());
+ 115 this->accept = acceptMime;
+ 116 return process(GET, url,
nullptr, data, len);
+
+
+ 120 virtual int head(
Url &url,
const char *acceptMime =
nullptr,
+ 121 const char *data =
nullptr,
int len = -1) {
+ 122 LOGI(
"head %s", url.url());
+ 123 this->accept = acceptMime;
+ 124 return process(HEAD, url,
nullptr, data, len);
+
+
+
+ 128 virtual int read(uint8_t *str,
int len) {
+
+ 130 if (reply_header.isChunked()) {
+ 131 return chunk_reader.read(*client_ptr, str, len);
+
+ 133 return client_ptr->read(str, len);
+
- 137 size_t readBytesUntil(
char terminator,
char *buffer,
size_t length) {
-
- 139 return client_ptr->readBytesUntil(terminator, buffer, length);
-
-
-
-
- 144 virtual int readln(uint8_t *str,
int len,
bool incl_nl =
true) {
-
- 146 if (reply_header.isChunked()) {
- 147 return chunk_reader.readln(*client_ptr, str, len);
-
- 149 return chunk_reader.readlnInternal(*client_ptr, str, len, incl_nl);
-
-
-
-
- 154 virtual HttpReplyHeader &reply() {
return reply_header; }
-
-
-
- 160 virtual void setAgent(
const char *agent) { this->agent = agent; }
-
- 162 virtual void setConnection(
const char *connection) {
- 163 this->connection = connection;
-
+ 137 size_t readBytes(uint8_t *str,
size_t len)
override {
+ 138 return read(str, len);
+
+
+ 141 size_t readBytesUntil(
char terminator,
char *buffer,
size_t length) {
+
+ 143 return client_ptr->readBytesUntil(terminator, buffer, length);
+
+
+
+
+ 148 virtual int readln(uint8_t *str,
int len,
bool incl_nl =
true) {
+
+ 150 if (reply_header.isChunked()) {
+ 151 return chunk_reader.readln(*client_ptr, str, len);
+
+ 153 return chunk_reader.readlnInternal(*client_ptr, str, len, incl_nl);
+
+
+
+
+ 158 virtual HttpReplyHeader &reply() {
return reply_header; }
+
+
+
+ 164 virtual void setAgent(
const char *agent) { this->agent = agent; }
- 166 virtual void setAcceptsEncoding(
const char *enc) {
- 167 this->accept_encoding = enc;
+ 166 virtual void setConnection(
const char *connection) {
+ 167 this->connection = connection;
- 170 virtual void setAcceptMime(
const char *mime) { this->accept = mime; }
-
- 172 size_t contentLength() {
- 173 const char *len_str = reply().get(CONTENT_LENGTH);
-
- 175 if (len_str !=
nullptr) {
-
-
- 178 LOGI(
"no CONTENT_LENGTH found in reply");
-
-
-
-
-
+ 170 virtual void setAcceptsEncoding(
const char *enc) {
+ 171 this->accept_encoding = enc;
+
+
+ 174 virtual void setAcceptMime(
const char *mime) { this->accept = mime; }
+
+ 176 size_t contentLength() {
+ 177 const char *len_str = reply().get(CONTENT_LENGTH);
+
+ 179 if (len_str !=
nullptr) {
+
+
+ 182 LOGI(
"no CONTENT_LENGTH found in reply");
+
+
+
-
- 189 request_header.put(
header, value);
-
-
- 192 Client &client() {
return *client_ptr; }
-
-
- 195 virtual int process(MethodID action, Url &url,
const char *mime,
- 196 const char *data,
int lenData = -1) {
-
- 198 if (data !=
nullptr && len <= 0) {
-
-
-
-
- 203 if (len > 0 && data !=
nullptr) {
- 204 LOGI(
"Writing data: %d bytes", len);
- 205 client_ptr->write((
const uint8_t *)data, len);
-
-
-
-
-
-
- 212 virtual int process(MethodID action, Url &url,
const char *mime,
- 213 Stream &stream,
int len = -1) {
-
-
-
-
-
-
-
-
-
-
-
- 226 if (client_ptr ==
nullptr) {
- 227 LOGE(
"The client has not been defined");
-
-
- 230 if (http_connect_callback) {
- 231 http_connect_callback(*
this, url, request_header);
-
- 233 if (!this->connected()) {
- 234 LOGI(
"process connecting to host %s port %d", url.host(), url.port());
- 235 int is_connected = connect(url.host(), url.port(), clientTimeout);
-
- 237 LOGE(
"Connect failed");
-
-
-
- 241 LOGI(
"process is already connected");
-
-
- 244 #if defined(ESP32) && defined(ARDUINO)
- 245 LOGI(
"Free heap: %u", (
unsigned)ESP.getFreeHeap());
-
+
+
+
+ 193 request_header.put(
header, value);
+
+
+ 196 Client &client() {
return *client_ptr; }
+
+
+ 199 virtual int process(MethodID action, Url &url,
const char *mime,
+ 200 const char *data,
int lenData = -1) {
+
+ 202 if (data !=
nullptr && len <= 0) {
+
+
+
+
+ 207 if (len > 0 && data !=
nullptr) {
+ 208 LOGI(
"Writing data: %d bytes", len);
+ 209 client_ptr->write((
const uint8_t *)data, len);
+
+
+
+
+
+
+ 216 virtual int process(MethodID action, Url &url,
const char *mime,
+ 217 Stream &stream,
int len = -1) {
+
+
+
+
+
+
+
+
+
+
+
+ 230 if (client_ptr ==
nullptr) {
+ 231 LOGE(
"The client has not been defined");
+
+
+ 234 if (http_connect_callback) {
+ 235 http_connect_callback(*
this, url, request_header);
+
+ 237 if (!this->connected()) {
+ 238 LOGI(
"process connecting to host %s port %d", url.host(), url.port());
+ 239 int is_connected = connect(url.host(), url.port(), clientTimeout);
+
+ 241 LOGE(
"Connect failed");
+
+
+
+ 245 LOGI(
"process is already connected");
+
- 248 reply_header.setProcessed();
-
- 250 host_name = url.host();
- 251 request_header.setValues(action, url.path());
-
- 253 request_header.put(CONTENT_LENGTH, lenData);
-
- 255 request_header.put(HOST_C, host_name);
- 256 request_header.put(CONNECTION, connection);
- 257 request_header.put(USER_AGENT, agent);
- 258 request_header.put(ACCEPT_ENCODING, accept_encoding);
- 259 request_header.put(ACCEPT, accept);
- 260 request_header.put(CONTENT_TYPE, mime);
- 261 request_header.
write(*client_ptr);
-
-
-
-
-
- 268 uint8_t buffer[CHUNK_SIZE];
-
- 270 int total_written = 0;
- 271 while (*client_ptr && stream.available() > 0) {
- 272 int result_len = stream.readBytes(buffer, CHUNK_SIZE);
-
- 274 int written =
write(buffer, result_len);
- 275 total_written += written;
- 276 LOGI(
"--> Bytes read %d vs written %d", result_len, written);
-
-
-
- 280 LOGI(
"Total bytes read %d vs written %d", total, total_written);
-
-
- 285 size_t write(
const uint8_t *data,
size_t len)
override {
-
-
-
-
- 290 is_chunked_output_active =
true;
- 291 client_ptr->println(len, HEX);
- 292 result = client_ptr->write(data, len);
- 293 client_ptr->println();
-
-
- 296 result = client_ptr->write(data, len);
-
-
-
-
-
-
-
-
- 306 if (is_chunked_output_active) client_ptr->println(0, HEX);
- 307 client_ptr->println();
- 308 is_chunked_output_active =
false;
-
- 310 LOGI(
"Request written ... waiting for reply");
-
-
- 313 reply_header.
read(*client_ptr);
-
-
- 316 if (reply_header.isChunked()) {
- 317 chunk_reader.open(*client_ptr);
-
-
-
-
- 322 return reply_header.statusCode();
-
-
-
-
- 328 http_connect_callback = callback;
-
-
- 332 void setTimeout(
int timeoutMs) { clientTimeout = timeoutMs; }
-
-
-
-
- 338 Client *client_ptr =
nullptr;
-
-
-
-
- 343 const char *agent =
nullptr;
- 344 const char *host_name =
nullptr;
- 345 const char *connection = CON_KEEP_ALIVE;
- 346 const char *accept = ACCEPT_ALL;
- 347 const char *accept_encoding = IDENTITY;
- 348 bool is_ready =
false;
- 349 int32_t clientTimeout = URL_CLIENT_TIMEOUT;
-
-
- 352 bool is_chunked_output_active =
false;
-
-
- 355 virtual int connect(
const char *ip, uint16_t port, int32_t timeout) {
-
- 357 client_ptr->setTimeout(timeout / 1000);
-
-
- 360 int is_connected = this->client_ptr->connect(ip, port);
- 361 LOGI(
"is connected %s with timeout %d", is_connected ?
"true" :
"false", (
int)timeout);
-
-
-
-
-
-
-
+ 248 #if defined(ESP32) && defined(ARDUINO)
+ 249 LOGI(
"Free heap: %u", (
unsigned)ESP.getFreeHeap());
+
+
+ 252 reply_header.setProcessed();
+
+ 254 host_name = url.host();
+ 255 request_header.setValues(action, url.path());
+
+ 257 request_header.put(CONTENT_LENGTH, lenData);
+
+ 259 request_header.put(HOST_C, host_name);
+ 260 request_header.put(CONNECTION, connection);
+ 261 request_header.put(USER_AGENT, agent);
+ 262 request_header.put(ACCEPT_ENCODING, accept_encoding);
+ 263 request_header.put(ACCEPT, accept);
+ 264 request_header.put(CONTENT_TYPE, mime);
+ 265 request_header.
write(*client_ptr);
+
+
+
+
+
+ 272 uint8_t buffer[CHUNK_SIZE];
+
+ 274 int total_written = 0;
+ 275 while (*client_ptr && stream.available() > 0) {
+ 276 int result_len = stream.readBytes(buffer, CHUNK_SIZE);
+
+ 278 int written =
write(buffer, result_len);
+ 279 total_written += written;
+ 280 LOGI(
"--> Bytes read %d vs written %d", result_len, written);
+
+
+
+ 284 LOGI(
"Total bytes read %d vs written %d", total, total_written);
+
+
+ 289 size_t write(
const uint8_t *data,
size_t len)
override {
+
+
+
+
+ 294 is_chunked_output_active =
true;
+ 295 client_ptr->println(len, HEX);
+ 296 result = client_ptr->write(data, len);
+ 297 client_ptr->println();
+
+
+ 300 result = client_ptr->write(data, len);
+
+
+
+
+
+
+
+
+ 310 if (is_chunked_output_active) client_ptr->println(0, HEX);
+ 311 client_ptr->println();
+ 312 is_chunked_output_active =
false;
+
+ 314 LOGI(
"Request written ... waiting for reply");
+
+
+ 317 reply_header.
read(*client_ptr);
+
+
+ 320 if (reply_header.isChunked()) {
+ 321 chunk_reader.open(*client_ptr);
+
+
+
+
+ 326 return reply_header.statusCode();
+
+
+
+
+ 332 http_connect_callback = callback;
+
+
+ 336 void setTimeout(
int timeoutMs) { clientTimeout = timeoutMs; }
+
+
+
+
+ 342 Client *client_ptr =
nullptr;
+
+
+
+
+ 347 const char *agent =
nullptr;
+ 348 const char *host_name =
nullptr;
+ 349 const char *connection = CON_KEEP_ALIVE;
+ 350 const char *accept = ACCEPT_ALL;
+ 351 const char *accept_encoding = IDENTITY;
+ 352 bool is_ready =
false;
+ 353 int32_t clientTimeout = URL_CLIENT_TIMEOUT;
+
+
+ 356 bool is_chunked_output_active =
false;
+
+
+ 359 virtual int connect(
const char *ip, uint16_t port, int32_t timeout) {
+
+ 361 client_ptr->setTimeout(timeout / 1000);
+
+
+ 364 int is_connected = this->client_ptr->connect(ip, port);
+ 365 LOGI(
"is connected %s with timeout %d", is_connected ?
"true" :
"false", (
int)timeout);
+
+
+
+
+
+
+
@@ -415,25 +419,25 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/_i_c_y_stream_8h_source.html b/_i_c_y_stream_8h_source.html
index 722e0b519..03c3952d3 100644
--- a/_i_c_y_stream_8h_source.html
+++ b/_i_c_y_stream_8h_source.html
@@ -206,7 +206,7 @@
-
+
diff --git a/_u_r_l_stream_8h_source.html b/_u_r_l_stream_8h_source.html
index 2d698f5ce..6244779a1 100644
--- a/_u_r_l_stream_8h_source.html
+++ b/_u_r_l_stream_8h_source.html
@@ -477,9 +477,9 @@
-
-
-
+
+
+