HTTP

HTTP EventThe HTTP Event is one that is triggered by the callback from one of the http_*() functions, like http_post_string. It actually generates a DS Map that is exclusive to this event and is stored in the special variable async_load (please see the individual functions for code examples that explain the use of this event in further detail). This DS map has the following general structure:

The above shows what you get when you use the http_post_string function, but each of the http_ functions may return a slightly different map, so please refer to the manual entry for each function to find out the precise data that is returned for it.

NOTE As async_load creates a DS map, these functions are particularly useful when coupled with the json_encode and json_decode functions.

There could also be additional data supplied by this map if you have requested files for downloading. In this case, the "status" will have a value of 1 and the DS map will hold these extra keys:

Note that the event will not be triggered for every single data packet that is received, but will rather update at any time during the download within the main game loop. Also note that currently this functionality is only available for regular Windows target platforms.