Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 7ade4d5

Browse files
authored
v1.1.0 to fix bug and optimize code
### Release v1.1.0 1. Fix long timeout if using `IPAddress`. 2. Optimize code 3. Display only successful responseText in examples 4. Improve debug messages by adding functions to display error messages instead of `cryptic error number`
1 parent f3d2a0a commit 7ade4d5

File tree

1 file changed

+62
-52
lines changed

1 file changed

+62
-52
lines changed

README.md

Lines changed: 62 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ This library is based on, modified from:
104104
## Prerequisites
105105

106106
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
107-
2. [`Earle Philhower's arduino-pico core v2.4.0+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
107+
2. [`Earle Philhower's arduino-pico core v2.5.0+`](https://github.com/earlephilhower/arduino-pico) for **RASPBERRY_PI_PICO_W with CYW43439 WiFi**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
108108
3. [`AsyncTCP_RP2040W library v1.0.0+`](https://github.com/khoih-prog/AsyncTCP_RP2040W) for RASPBERRY_PI_PICO_W with CYW43439 WiFi. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/AsyncTCP_RP2040W.svg?)](https://www.ardu-badge.com/AsyncTCP_RP2040W)
109109

110110
---
@@ -178,13 +178,13 @@ Please take a look at other examples, as well.
178178

179179
#### 1. File [AsyncHTTPRequest.ino](examples/AsyncHTTPRequest/AsyncHTTPRequest.ino)
180180

181-
https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/39eb61479ae868729b43ebb2c86bc11437fce2f8/examples/AsyncHTTPRequest/AsyncHTTPRequest.ino#L41-L177
181+
https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/f3d2a0a86717a1af77707a112ba1936027dfbca6/examples/AsyncHTTPRequest/AsyncHTTPRequest.ino#L41-L185
182182

183183
---
184184

185185
#### 2. File [defines.h](examples/AsyncHTTPRequest/defines.h)
186186

187-
https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/39eb61479ae868729b43ebb2c86bc11437fce2f8/examples/AsyncHTTPRequest/defines.h#L1-L30
187+
https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/f3d2a0a86717a1af77707a112ba1936027dfbca6/examples/AsyncHTTPRequest/defines.h#L20-L30
188188

189189
---
190190
---
@@ -194,51 +194,59 @@ https://github.com/khoih-prog/AsyncHTTPRequest_RP2040W/blob/39eb61479ae868729b43
194194
#### 1. [AsyncHTTPRequest](examples/AsyncHTTPRequest) running on RASPBERRY_PI_PICO_W using CYW43439 WiFi
195195

196196
```
197+
22:21:21.419 -> Start AsyncHTTPRequest on RASPBERRY_PI_PICO_W
198+
22:21:21.419 -> AsyncTCP_RP2040W v1.0.0
199+
22:21:21.419 -> AsyncHTTPRequest_RP2040W v1.1.0
200+
22:21:21.419 -> Connecting to SSID: HueNet1
201+
22:21:28.786 -> SSID: HueNet1
202+
22:21:28.786 -> Local IP Address: 192.168.2.180
203+
22:21:28.786 -> Request sent
204+
22:21:28.786 -> [AHTTP]
205+
22:21:28.786 -> **************************************
206+
22:21:28.786 -> [AHTTP] Response Code = NOT_CONNECTED
207+
22:21:28.885 -> [AHTTP]
208+
22:21:28.885 -> **************************************
209+
22:21:28.885 -> [AHTTP] Response Code = HTTP OK
210+
22:21:28.885 ->
211+
22:21:28.885 -> **************************************
212+
22:21:28.885 -> abbreviation: EDT
213+
22:21:28.885 -> client_ip: 45.72.143.183
214+
22:21:28.885 -> datetime: 2022-09-01T22:21:28.831047-04:00
215+
22:21:28.885 -> day_of_week: 4
216+
22:21:28.885 -> day_of_year: 244
217+
22:21:28.885 -> dst: true
218+
22:21:28.885 -> dst_from: 2022-03-13T07:00:00+00:00
219+
22:21:28.885 -> dst_offset: 3600
220+
22:21:28.885 -> dst_until: 2022-11-06T06:00:00+00:00
221+
22:21:28.885 -> raw_offset: -18000
222+
22:21:28.885 -> timezone: America/Toronto
223+
22:21:28.885 -> unixtime: 1662085288
224+
22:21:28.885 -> utc_datetime: 2022-09-02T02:21:28.831047+00:00
225+
22:21:28.885 -> utc_offset: -04:00
226+
22:21:28.885 -> week_number: 35
227+
22:21:28.885 -> **************************************
228+
22:22:28.801 -> Request sent
229+
22:22:28.834 -> [AHTTP]
230+
22:22:28.834 -> **************************************
231+
22:22:28.834 -> [AHTTP] Response Code = HTTP OK
232+
22:22:28.834 ->
233+
22:22:28.834 -> **************************************
234+
22:22:28.834 -> abbreviation: EDT
235+
22:22:28.834 -> client_ip: 45.72.143.183
236+
22:22:28.834 -> datetime: 2022-09-01T22:22:28.779577-04:00
237+
22:22:28.834 -> day_of_week: 4
238+
22:22:28.834 -> day_of_year: 244
239+
22:22:28.834 -> dst: true
240+
22:22:28.834 -> dst_from: 2022-03-13T07:00:00+00:00
241+
22:22:28.834 -> dst_offset: 3600
242+
22:22:28.834 -> dst_until: 2022-11-06T06:00:00+00:00
243+
22:22:28.834 -> raw_offset: -18000
244+
22:22:28.834 -> timezone: America/Toronto
245+
22:22:28.834 -> unixtime: 1662085348
246+
22:22:28.834 -> utc_datetime: 2022-09-02T02:22:28.779577+00:00
247+
22:22:28.834 -> utc_offset: -04:00
248+
22:22:28.834 -> week_number: 35
197249
198-
Start AsyncHTTPRequest on RASPBERRY_PI_PICO_W
199-
AsyncTCP_RP2040W v1.0.0
200-
AsyncHTTPRequest_RP2040W v1.0.1
201-
Connecting to SSID: HueNet1
202-
SSID: HueNet1
203-
Local IP Address: 192.168.2.180
204-
Request sent
205-
206-
**************************************
207-
abbreviation: EDT
208-
client_ip: 69.165.159.183
209-
datetime: 2022-08-15T21:53:32.353173-04:00
210-
day_of_week: 1
211-
day_of_year: 227
212-
dst: true
213-
dst_from: 2022-03-13T07:00:00+00:00
214-
dst_offset: 3600
215-
dst_until: 2022-11-06T06:00:00+00:00
216-
raw_offset: -18000
217-
timezone: America/Toronto
218-
unixtime: 1660614812
219-
utc_datetime: 2022-08-16T01:53:32.353173+00:00
220-
utc_offset: -04:00
221-
week_number: 33
222-
**************************************
223-
Request sent
224-
225-
**************************************
226-
abbreviation: EDT
227-
client_ip: 69.165.159.183
228-
datetime: 2022-08-15T21:54:32.316488-04:00
229-
day_of_week: 1
230-
day_of_year: 227
231-
dst: true
232-
dst_from: 2022-03-13T07:00:00+00:00
233-
dst_offset: 3600
234-
dst_until: 2022-11-06T06:00:00+00:00
235-
raw_offset: -18000
236-
timezone: America/Toronto
237-
unixtime: 1660614872
238-
utc_datetime: 2022-08-16T01:54:32.316488+00:00
239-
utc_offset: -04:00
240-
week_number: 33
241-
**************************************
242250
```
243251

244252
---
@@ -248,7 +256,7 @@ week_number: 33
248256
```
249257
Start AsyncDweetPOST on RASPBERRY_PI_PICO_W with RP2040W CYW43439 WiFi
250258
AsyncTCP_RP2040W v1.0.0
251-
AsyncHTTPRequest_RP2040W v1.0.1
259+
AsyncHTTPRequest_RP2040W v1.1.0
252260
Connecting to SSID: HueNet1
253261
SSID: HueNet1
254262
Local IP Address: 192.168.2.180
@@ -270,7 +278,7 @@ Actual value: 88
270278
```
271279
Start AsyncWebClientRepeating on RASPBERRY_PI_PICO_W
272280
AsyncTCP_RP2040W v1.0.0
273-
AsyncHTTPRequest_RP2040W v1.0.1
281+
AsyncHTTPRequest_RP2040W v1.1.0
274282
Connecting to SSID: HueNet1
275283
SSID: HueNet1
276284
Local IP Address: 192.168.2.180
@@ -334,8 +342,8 @@ You can also change the debugging level from 0 to 4
334342
#define ASYNC_HTTP_RP2040W_DEBUG_PORT Serial
335343

336344
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
337-
#define _ASYNCTCP_RP2040W_LOGLEVEL_ 1
338-
#define _ASYNC_HTTP_LOGLEVEL_ 1
345+
#define _ASYNCTCP_RP2040W_LOGLEVEL_ 2
346+
#define _ASYNC_HTTP_LOGLEVEL_ 2
339347
```
340348

341349
---
@@ -368,7 +376,9 @@ Submit issues to: [AsyncHTTPRequest_RP2040W issues](https://github.com/khoih-pro
368376
3. Add PUT, PATCH, DELETE and HEAD besides GET and POST.
369377
4. Fix `multiple-definitions` linker error and weird bug related to `src_cpp`.
370378
5. Optimize library code by using `reference-passing` instead of `value-passing`
371-
379+
6. Fix long timeout if using `IPAddress`
380+
381+
372382
---
373383
---
374384

0 commit comments

Comments
 (0)