Http.get
Revision as of 04:24, 11 September 2020 by JoeStrout (talk | contribs) (Created page with "In Mini Micro, the http.get function returns the contents of a URL using the HTTP protocol. It supports text, images, sounds, and raw binary data. === Arguments ===...")
In Mini Micro, the http.get function returns the contents of a URL using the HTTP protocol. It supports text, images, sounds, and raw binary data.
Arguments
Parameter Name | Meaning |
---|---|
url | URL of the web page or resource to fetch |
Usage Notes
The type of the value returned depends on the MIME type reported by the server, as follows:
MIME Type | MiniScript Type |
---|---|
image | Image object |
audio | Sound object |
text, javascript, xml, or json | string |
any other type | RawData object |
Example
The following example, typed on the Mini Micro command line, retrieves and displays Minnie from the MiniScript web site.
view http.get("https://miniscript.org/img/Icon.png")