The HTTP plug-in provides the ability to call external web servers or API:s through HTTP (HyperText Transport Protocol). This allows RapidContext to access simple web services or to retrieve remote content in a proxy-like way.
The HTTP plug-in provides two ways to perform an HTTP request from the RapidContext server:
An HTTP connection can also be created to share base url and headers parameters between procedures.
HTTP responses can be processed differently depending on the procedure flags parameter:
The default processing returns successful (HTTP 2xx) responses as a text strings. Other HTTP response codes result in an error being thrown.
The url, headers and data parameters may
contain procedure call arguments. These are substituted with the procedure
argument values at call time. The argument names are prefixed with either a
@ (unencoded) or
: (encoded) character
where they should be inserted:
# Substituting 'name' and 'raw' arguments user=:name @raw
Depending on parameter and the Content-Type header, the argument
values may be encoded as a URL parameter, JSON text or XML text. Also note
that the data parameter will automatically process newlines and
join the text with