Skip to content

Commit 40e22e3

Browse files
authored
Merge pull request #16 from playmiel/dev
1.1.2
2 parents f989536 + 15396ab commit 40e22e3

File tree

24 files changed

+875
-32
lines changed

24 files changed

+875
-32
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ An asynchronous HTTP client library for ESP32 microcontrollers, built on top of
1616
-**Multiple HTTP methods** - GET, POST, PUT, DELETE, HEAD, PATCH support
1717
-**Custom headers** - Set global and per-request headers
1818
-**Callback-based responses** - Success and error callbacks
19+
-**Automatic cookies** - Captures `Set-Cookie` responses and replays them via `Cookie` on matching requests
1920
-**ESP32 only** – Arduino-ESP32 core 3.x required (core 2.x dropped; ESP8266 removed since 1.0.1)
2021
-**Simple API** - Easy to use with minimal setup
2122
-**Configurable timeouts** - Set custom timeout values
@@ -82,7 +83,7 @@ void setup() {
8283
void loop() {
8384
#if !ASYNC_TCP_HAS_TIMEOUT
8485
// If your AsyncTCP does NOT provide native timeouts, you must drive timeouts manually
85-
// unless you build with -DASYNC_HTTP_ENABLE_AUTOLOOP (ESP32 only).
86+
// unless you build with -DASYNC_HTTP_ENABLE_AUTOLOOP .
8687
// Either:
8788
// - Define ASYNC_HTTP_ENABLE_AUTOLOOP (ESP32): a tiny FreeRTOS task will call client.loop() for you; or
8889
// - Call client.loop() periodically here yourself (recommended every ~10-20ms when busy).
@@ -160,6 +161,11 @@ void setMaxParallel(uint16_t maxParallel);
160161
161162
// Set User-Agent string
162163
void setUserAgent(const char* userAgent);
164+
165+
// Cookie jar helpers
166+
void clearCookies();
167+
void setCookie(const char* name, const char* value, const char* path = "/", const char* domain = nullptr,
168+
bool secure = false);
163169
```
164170

165171
#### Callback Types
@@ -531,8 +537,6 @@ pio test -e esp32dev -f test_chunk_parse
531537

532538
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
533539

534-
- Added: HEAD, PATCH
535-
536540
## Contributing
537541

538542
Contributions are welcome! Please feel free to submit a Pull Request.

examples/arduino/CompileTest/CompileTest.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void setup() {
2020
void loop() {
2121
#if !ASYNC_TCP_HAS_TIMEOUT
2222
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
23-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), you must call client.loop() periodically to enforce
23+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), you must call client.loop() periodically to enforce
2424
// request timeouts. Uncomment the line below to enable request timeouts in this example.
2525
// client.loop();
2626
#endif

examples/arduino/CustomHeaders/CustomHeaders.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void setup() {
3333
void loop() {
3434
#if !ASYNC_TCP_HAS_TIMEOUT
3535
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
36-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), call client.loop() periodically to enforce request timeouts.
36+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), call client.loop() periodically to enforce request timeouts.
3737
client.loop();
3838
#endif
3939
}

examples/arduino/MultipleRequests/MultipleRequests.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void setup() {
4242
void loop() {
4343
#if !ASYNC_TCP_HAS_TIMEOUT
4444
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
45-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), call client.loop() periodically to enforce request timeouts.
45+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), call client.loop() periodically to enforce request timeouts.
4646
client.loop();
4747
#endif
4848
}

examples/arduino/PostWithData/PostWithData.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void setup() {
3232
void loop() {
3333
#if !ASYNC_TCP_HAS_TIMEOUT
3434
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
35-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), call client.loop() periodically to enforce request timeouts.
35+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), call client.loop() periodically to enforce request timeouts.
3636
client.loop();
3737
#endif
3838
}

examples/arduino/SimpleGet/SimpleGet.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void setup() {
2929
void loop() {
3030
#if !ASYNC_TCP_HAS_TIMEOUT
3131
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
32-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), call client.loop() periodically to enforce request timeouts.
32+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), call client.loop() periodically to enforce request timeouts.
3333
client.loop();
3434
#endif
3535
}

examples/arduino/StreamingUpload/StreamingUpload.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void setup() {
7171
void loop() {
7272
#if !ASYNC_TCP_HAS_TIMEOUT
7373
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
74-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), call client.loop() periodically to enforce request timeouts.
74+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), call client.loop() periodically to enforce request timeouts.
7575
client.loop();
7676
#endif
7777
}

examples/platformio/CompileTest/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void testHttpMethodsCompilation() {
9898

9999
void loop() {
100100
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
101-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), you must call client.loop() periodically to enforce
101+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), you must call client.loop() periodically to enforce
102102
// request timeouts. Uncomment the block below to enable timeouts when running on hardware:
103103
// #if !ASYNC_TCP_HAS_TIMEOUT
104104
// client.loop();

examples/platformio/CustomHeaders/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void setup() {
7373
void loop() {
7474
#if !ASYNC_TCP_HAS_TIMEOUT
7575
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
76-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), you must call client.loop() periodically to enforce
76+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), you must call client.loop() periodically to enforce
7777
// request timeouts. Uncomment the line below when running on hardware to enable timeouts.
7878
// client.loop();
7979
#endif

examples/platformio/MultipleRequests/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void setup() {
7070
void loop() {
7171
#if !ASYNC_TCP_HAS_TIMEOUT
7272
// Timeouts: If your AsyncTCP build doesn't provide native timeouts and you didn't enable auto-loop
73-
// (-DASYNC_HTTP_ENABLE_AUTOLOOP, ESP32 only), you must call client.loop() periodically to enforce
73+
// (-DASYNC_HTTP_ENABLE_AUTOLOOP), you must call client.loop() periodically to enforce
7474
// request timeouts. Uncomment the line below when running on hardware to enable timeouts.
7575
// client.loop();
7676
#endif

0 commit comments

Comments
 (0)