Component: HTTP Fetch ( Comms)

From Flowcode Help
Jump to navigationJump to search
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.

FC6 Icon.png Fetch HTTP Example


The HTML source is hosted at the following URL: http://www.flowcode.co.uk/example/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.

FC6 Icon.png Fetch HTTP JSON Example


The HTML source is hosted at the following URL: http://www.flowcode.co.uk/example/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.

FC6 Icon.png Fetch HTTP Time Date Example


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.

File:jsonfetchtimedate.txt


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.

FC6 Icon.png Fetch Parameter Example


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.

File:get_data.txt


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.

FC6 Icon.png Web Weather Example


Macro reference

Fetch

Fc9-comp-macro.png Fetch
Start the process of fetching a resource from a web server 
Fc9-string-icon.png - STRING sParams
Parameters for the Fetch call 
Fc9-void-icon.png - VOID Return


SetDataType

Fc9-comp-macro.png SetDataType
Override the DataType property 
Fc9-s32-icon.png - LONG Type
0=JSON Encoded. 1=Raw Text 
Fc9-void-icon.png - VOID Return


SetMacro

Fc9-comp-macro.png SetMacro
 
Fc9-string-icon.png - STRING sMacro
 
Fc9-void-icon.png - VOID Return


SetURL

Fc9-comp-macro.png SetURL
Sets the URL for the Fetch call 
Fc9-string-icon.png - STRING sURL
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-10-icon.png URL
 
Fc9-type-24-icon.png Call macro
 
Fc9-type-16-icon.png DataType
Decide what type of data to receive