AsyncHTTPRequest_Teensy41 Library

AsyncHTTPRequest_Teensy41 library GitHub release
How To Install Using Arduino Library Manager


Why do we need this Async AsyncHTTPRequest_Teensy41 library

Features

  1. Asynchronous HTTP Request library for Teensy 4.1 using built-in QNEthernet
  2. Providing a subset of HTTP.
  3. Relying on Teensy41_AsyncTCP library
  4. Methods similar in format and usage to XmlHTTPrequest in Javascript.

Supports

  1. GET, POST, PUT, PATCH, DELETE and HEAD
  2. Request and response headers
  3. Chunked response
  4. Single String response for short (<~5K) responses (heap permitting).
  5. Optional onData callback.
  6. Optional onReadyStatechange callback.

This library is based on, modified from:

  1. Bob Lemaire's asyncHTTPrequest Library
  2. AsyncHTTPRequest_Generic Library

Currently supported Boards

  1. Teensy 4.1 using QNEthernet Library


Changelog

Releases v1.7.1

  1. Initial porting and coding for Teensy 4.1 using built-in QNEthernet
  2. 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
**************************************

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.