AsyncHTTPRequest_Teensy41 library
How To Install Using Arduino Library Manager
Why do we need this Async AsyncHTTPRequest_Teensy41 library
Features
- Asynchronous HTTP Request library for Teensy 4.1 using built-in QNEthernet
- Providing a subset of HTTP.
- Relying on Teensy41_AsyncTCP library
- Methods similar in format and usage to XmlHTTPrequest in Javascript.
Supports
- GET, POST, PUT, PATCH, DELETE and HEAD
- Request and response headers
- Chunked response
- Single String response for short (<~5K) responses (heap permitting).
- Optional onData callback.
- Optional onReadyStatechange callback.
This library is based on, modified from:
Currently supported Boards
- Teensy 4.1 using QNEthernet Library
Changelog
Releases v1.7.1
- Initial porting and coding for Teensy 4.1 using built-in QNEthernet
- Bump up version to v1.7.1 to sync with AsyncHTTPRequest_Generic v1.7.1
Debug Terminal Output Samples
1. AsyncHTTPRequest on Teensy4.1 QNEthernet
Following are debug terminal output and screen shots when running example AsyncHTTPRequest on Teensy4.1 using Built-in Ethernet and QNEthernet Library demonstrate the operation of AsyncHTTPRequest.
Start AsyncHTTPRequest on TEENSY 4.1
AsyncHTTPRequest_Teensy41 v1.7.1
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
**************************************
abbreviation: EDT
client_ip: aaa.bbb.ccc.ddd
datetime: 2022-03-18T14:56:13.784882-04:00
day_of_week: 5
day_of_year: 77
dst: true
dst_from: 2022-03-13T07:00:00+00:00
dst_offset: 3600
dst_until: 2022-11-06T06:00:00+00:00
raw_offset: -18000
timezone: America/Toronto
unixtime: 1647629773
utc_datetime: 2022-03-18T18:56:13.784882+00:00
utc_offset: -04:00
week_number: 11
**************************************
**************************************
abbreviation: EDT
client_ip: aaa.bbb.ccc.ddd
datetime: 2022-03-18T14:57:13.711131-04:00
day_of_week: 5
day_of_year: 77
dst: true
dst_from: 2022-03-13T07:00:00+00:00
dst_offset: 3600
dst_until: 2022-11-06T06:00:00+00:00
raw_offset: -18000
timezone: America/Toronto
unixtime: 1647629833
utc_datetime: 2022-03-18T18:57:13.711131+00:00
utc_offset: -04:00
week_number: 11
**************************************
2. AsyncCustomHeader on Teensy4.1 QNEthernet
Start AsyncCustomHeader on TEENSY 4.1
AsyncHTTPRequest_Teensy41 v1.7.1
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
Sending GET Request to http://worldtimeapi.org/api/timezone/America/Toronto.txt
**************************************
abbreviation: EDT
client_ip: aaa.bbb.ccc.ddd
datetime: 2022-03-18T15:48:07.200911-04:00
day_of_week: 5
day_of_year: 77
dst: true
dst_from: 2022-03-13T07:00:00+00:00
dst_offset: 3600
dst_until: 2022-11-06T06:00:00+00:00
raw_offset: -18000
timezone: America/Toronto
unixtime: 1647632887
utc_datetime: 2022-03-18T19:48:07.200911+00:00
utc_offset: -04:00
week_number: 11
**************************************
Sending GET Request to http://worldtimeapi.org/api/timezone/America/Toronto.txt
**************************************
abbreviation: EDT
client_ip: aaa.bbb.ccc.ddd
datetime: 2022-03-18T15:48:57.186738-04:00
day_of_week: 5
day_of_year: 77
dst: true
dst_from: 2022-03-13T07:00:00+00:00
dst_offset: 3600
dst_until: 2022-11-06T06:00:00+00:00
raw_offset: -18000
timezone: America/Toronto
unixtime: 1647632937
utc_datetime: 2022-03-18T19:48:57.186738+00:00
utc_offset: -04:00
week_number: 11
**************************************