UrlLoader

Revision as of 09:25, 23 August 2018 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2012.2.2<br/> === Description === <br /> The `UrlLoader` class is used to download data from an URL....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Supported platforms:
Available since: Gideros 2012.2.2

Description


The `UrlLoader` class is used to download data from an URL. It can be used to download (and optionally save) text files, XML files, JSON files, image files or binary files, etc.
Downloaded data is delivered at `event.data` field of `Event.COMPLETE` event as string. Lua is eight-bit clean and so strings may contain characters with any numeric value, including embedded zeros. That means that you can store any binary data into a string.

HTTP Request Methods



UrlLoader supports GET, POST, PUT and DELETE methods. These are defined by these string constants:


  • `UrlLoader.GET = "get"`

  • `UrlLoader.POST = "post"`

  • `UrlLoader.PUT = "put"`

  • `UrlLoader.DELETE = "delete"`



Methods

Events

Constants