HTTP Plug-In

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.

1. Built-in Procedure & Procedure Type

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.

2. Result Mappings

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.

3. Parameter Substitution

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

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 & characters.