Difference between revisions of "Component: HTTP Fetch ( Comms)"
Line 26: | Line 26: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | ===HTTP=== | ||
+ | |||
+ | Example program showing how to retreive the HTML source of a HTTP URL. | ||
+ | |||
+ | {{Fcfile|WebFetchHTML.fcsx|Fetch HTTP Example}} | ||
+ | |||
+ | |||
+ | The HTML source is hosted at the following URL: http://www.flowcode.co.uk/examples/fetchtest.txt | ||
+ | |||
+ | [[:File: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. | ||
+ | |||
+ | {{Fcfile|WebFetchJSON.fcsx|Fetch HTTP JSON Example}} | ||
+ | |||
+ | |||
+ | The HTML source is hosted at the following URL: www.flowcode.co.uk/examples/jsonfetchtest.txt | ||
+ | |||
+ | [[:File: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. | ||
+ | |||
+ | {{Fcfile|WebFetchJSONTimeDate.fcsx|Fetch HTTP Time Date Example}} | ||
+ | |||
+ | |||
+ | The HTML source is hosted at the following URL: www.flowcode.co.uk/examples/jsonfetchtimedate.php | ||
+ | |||
+ | [[:File:jsonfetchtimedate.php]] | ||
+ | |||
===Weather Example=== | ===Weather Example=== |
Revision as of 15:01, 1 December 2023
Author | MatrixTSL |
Version | 0.1 |
Category | Comms |
Contents
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/examples/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: www.flowcode.co.uk/examples/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: www.flowcode.co.uk/examples/jsonfetchtimedate.php
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 |
SetMacro
![]() |
SetMacro |
![]() |
sMacro |
![]() |
Return |
SetURL
![]() |
SetURL |
Sets the URL for the Fetch call | |
![]() |
sURL |
![]() |
Return |
Property reference
![]() |
Properties |
![]() |
URL |
![]() |
Call macro |