Loading

URLFETCH Extension: io.warp10.script.ext.urlfetch.UrlFetchWarpScriptExtension


extensions web
Since v1.0.2
Available on all platforms
See also

Configuration parameters


The URLFETCH function sends HTTP(S) GET requests, waits for the responses and puts them on the stack.

For security reasons, the stack must be authenticated for this function to work, see AUTHENTICATE.

Signature

Examples

'READ_TOKEN' AUTHENTICATE // You need a valid token 'https://warp10.io' URLFETCH 0 GET // Only one URL, get the first and only result 3 GET // Get the payload B64-> 'utf8' BYTES-> // Convert it to a string
'READ_TOKEN' AUTHENTICATE // You need a valid token [ 'https://httpstat.us/200' 'https://httpstat.us/404' 'https://httpstat.us/418' ] URLFETCH <% DROP 1 GET // Get only the status message %> LMAP // For each returned result