HTTP
Extension: io.warp10.script.ext.http.HttpWarpScriptExtension
extensions webConfiguration parameters
-
warpscript.http.authentication.required
-
warpscript.http.capability
-
warpscript.http.maxrequests
-
warpscript.http.maxsize
-
warpscript.http.maxchunksize
-
warpscript.http.host.patterns
-
webcall.host.patterns
The HTTP
function sends an HTTP request, waits for the response then returns it.
The input is a MAP with at least the field url
.
The response is a MAP with the fields status.code
, status.message
, headers
and content
.
The HTTP
function can also be used in streaming mode by providing a positive chunk.size
argument.
In streaming mode, whenever chunk.size
bytes are downloaded, a response MAP with the additional field chunk.number
is pushed onto the stack and the macro given as chunk.macro
argument is being executed.
Finally, a last chunk.macro
execution is done on a chunk response that has empty content
and chunk.number = -1
.
The HTTP
function makes use of token's capabilities to raise the initial limits per warpscript (set from configurations).
Other configurable options: