8#include "AudioLogger.h"
10#define CHUNK_SIZE 1024
46 LOGI(
"setHost %s", host);
83 virtual int post(
Url &
url,
const char *mime,
const char *data,
int len = -1) {
95 virtual int put(
Url &
url,
const char *mime,
const char *data,
int len = -1) {
108 const char *data =
nullptr,
int len = -1) {
115 const char *data =
nullptr,
int len = -1) {
123 const char *data =
nullptr,
int len = -1) {
140 int result =
read(str, len);
142 LOGE(
"HttpRequest::read error");
189 LOGI(
"no CONTENT_LENGTH found in reply");
210 const char *data,
int lenData = -1) {
212 if (data !=
nullptr && len <= 0) {
217 if (len > 0 && data !=
nullptr) {
218 LOGI(
"Writing data: %d bytes", len);
227 Stream &stream,
int len = -1) {
241 LOGE(
"The client has not been defined");
251 LOGE(
"Connect failed");
255 LOGI(
"process is already connected");
258#if defined(ESP32) && defined(ARDUINO)
259 LOGI(
"Free heap: %u", (
unsigned)
ESP.getFreeHeap());
284 int total_written = 0;
289 total_written += written;
294 LOGI(
"Total bytes read %d vs written %d", total, total_written);
324 LOGI(
"Request written ... waiting for reply");
332 LOGE(
"HttpRequest: Failed to open chunked reader");
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define CHUNK_SIZE
Definition HttpRequest.h:10
MethodID
supported http methods
Definition HttpTypes.h:3
@ HEAD
Definition HttpTypes.h:6
@ GET
Definition HttpTypes.h:5
@ POST
Definition HttpTypes.h:7
@ DELETE
Definition HttpTypes.h:9
@ PUT
Definition HttpTypes.h:8
@ HEX
Definition NoArduino.h:58
#define URL_CLIENT_TIMEOUT
Definition esp8266.h:23