KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Intro to HTTPRequest: Asynchronous API Requests with Callbacks
PRODUCT: 4D | VERSION: 19 R6 | PLATFORM: Mac & Win
Published On: September 26, 2022


A new way to perform HTTP requests from a 4D application is available starting in v19 R6. This feature is the HTTPRequest class from the 4D class store. Developers can utilize this class to create and send HTTP requests, manage HTTPRequest objects, and execute callback functions asynchronously. This technical note will discuss how the class works and its benefits over the previous approach to sending HTTP requests. This technical note will also demonstrate how to use the HTTPRequest class to work with an actual API. The example will involve fetching data via the Art Institute of Chicago API.

Download Complete Tech Note: Tech Note Document

Commented by Brent Raymond on September 27, 2022 at 9:58 AM
Nice work! For more information about the API... https://4dmethod.com/2019/11/08/november-13th-meeting-art-institute-of-chicago-api-nikhil-trivedi-illya-moskvin/