15#if !defined(USE_WIFIS3)
16#define HAS_CLIENT_SECURE
58#if defined(HAS_CLIENT_SECURE)
85 virtual bool begin(
const char*
urlStr,
const char* acceptMime =
nullptr,
87 const char* reqData =
"")
override {
90 LOGE(
"preProcess failed");
93 int result = process<const char*>(action,
url, reqMime, reqData);
103 LOGI(
"==> http result: %d", result);
113 LOGE(
"preProcess failed");
116 int result = process<Stream&>(action,
url, reqMime, reqData, len);
126 LOGI(
"==> http status: %d", result);
131 virtual void end()
override {
141 LOGD(
"available: %d", result);
145 virtual size_t readBytes(uint8_t* data,
size_t len)
override {
153 LOGD(
"readBytes %d -> %d", (
int)len,
read);
180 virtual size_t write(
const uint8_t*,
size_t len)
override {
245 LOGI(
"Request written ... waiting for reply");
251 LOGE(
"Error code %d recieved: stop waiting for reply", rc);
258 LOGD(
"available: %d", avail);
267#if defined(HAS_CLIENT_SECURE)
270 LOGE(
"setCACert is not supported on this platform");
292#if defined(HAS_CLIENT_SECURE)
314 LOGE(
"Not connected");
320 if (acceptMime !=
nullptr) {
332 esp_wifi_set_ps(WIFI_PS_NONE);
340 template <
typename T>
351 if (redirect_url !=
nullptr) {
352 LOGW(
"Redirected to: %s", redirect_url);
362 LOGE(
"Location is null");
371#if defined(HAS_CLIENT_SECURE)
381 #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3,0,0)
392#if defined(HAS_CLIENT_SECURE)
395 LOGI(
"setupClientSecure");
401 #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3,0,0)
443#if defined(USE_CONCURRENCY)
static HardwareSerial Serial
Definition Arduino.h:179
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define TRACEI()
Definition AudioLoggerIDF.h:32
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
MethodID
supported http methods
Definition HttpTypes.h:3
@ GET
Definition HttpTypes.h:5
#define DEFAULT_BUFFER_SIZE
Definition avr.h:20
void stop()
Definition Arduino.h:164
#define URL_CLIENT_TIMEOUT
Definition esp8266.h:23
#define URL_HANDSHAKE_TIMEOUT
Definition esp8266.h:24