Component: HTTP Fetch ( Comms): Difference between revisions
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (One intermediate revision by the same user not shown) | |||
| Line 97: | Line 97: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Fetch''' | ||
|- | |- | ||
| colspan="2" | Start the process of fetching a resource from a web server | | colspan="2" | Start the process of fetching a resource from a web server | ||
| Line 116: | Line 116: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetDataType''' | ||
|- | |- | ||
| colspan="2" | Override the DataType property | | colspan="2" | Override the DataType property | ||
| Line 135: | Line 135: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetMacro''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 154: | Line 154: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetURL''' | ||
|- | |- | ||
| colspan="2" | Sets the URL for the Fetch call | | colspan="2" | Sets the URL for the Fetch call | ||
| Line 173: | Line 173: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:23, 13 July 2026
| Author | MatrixTSL |
| Version | 0.1 |
| Category | Comms |
HTTP Fetch component
Component designed to request resources from an external HTTP server.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_WEBEXP_Fetch.fcsx
Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_Fetch.fcsx
Detailed description
No detailed description exists yet for this component
Examples
HTTP
Example program showing how to retreive the HTML source of a HTTP URL.
The HTML source is hosted at the following URL: http://www.flowcode.co.uk/example/fetchtest.txt
HTTP JSON Encoded
Example program showing how to retreive the HTML source of a HTTP URL. Here the source is encoded JSON data which we can parse through.
The HTML source is hosted at the following URL: http://www.flowcode.co.uk/example/jsonfetchtest.txt
HTTP JSON Encoded Time and Date
Example program showing how to retreive the HTML source of a HTTP URL. Here the source is encoded JSON data which we can parse through. The data is created using a PHP script which allows for dynamic data such as the current time and date.
The HTML source is hosted at the following URL: http://www.flowcode.co.uk/example/jsonfetchtimedate.php
Please note the file type for the file below has been changed from .php to .txt to be allowed onto the Wiki.
Fetch Parameters
Example program showing how to retreive the JSON data source of a HTTP URL. Here the source is encoded JSON data which we can parse through. The data is created using a PHP script which allows for dynamic data in this case based on the selection made using the radio buttons.
The HTML source is hosted at the following URL: http://www.flowcode.co.uk/example/get_data.php
Please note the file type for the file below has been changed from .php to .txt to be allowed onto the Wiki.
Weather Example
Example program showcasing a number of components used together to collect data from a URL using fetch, before processing the data using the object helper and array helper components.
Macro reference
Fetch
| Fetch | |
| Start the process of fetching a resource from a web server | |
| sParams | |
| Parameters for the Fetch call | |
| Return | |
SetDataType
| SetDataType | |
| Override the DataType property | |
| Type | |
| 0=JSON Encoded. 1=Raw Text | |
| Return | |
SetMacro
| SetMacro | |
| sMacro | |
| Return | |
SetURL
| SetURL | |
| Sets the URL for the Fetch call | |
| sURL | |
| Return | |
Property reference
| Properties | |
| URL | |
| Call macro | |
| DataType | |
| Decide what type of data to receive | |