HTTP Listener Documentation
Version:Â 5.0.0Â
Retrieved:Â 2025-10-09 15:15:55
HTTP Listener
The module is used to listen for requests that are sent to the Crosser Node. This module will select messages by using the HTTP request path to match in the Settings.
If processing goes well the module will send a HTTP 200 <OK> back to the client that did the request. If there is an error a HTTP 4xx will be sent back including details about the error.
- Requests against paths where no Flow is listening will return 404 <Not Found>.
- Requests using a verb that does not match the module settings will return 405 <Method Not Allowed>.
- Requests with invalid content (such as content-type is JSON but body can not be parsed to JSON) will return 400 <Bad Request>.
With the default settings the module can be used to receive data from external HTTP clients, to be processed in the Flow. No data is sent back to the clients in this mode. If Send HTTP response automatically is disabled, data from the Flow can be sent back to the HTTP clients by using the HTTP Response module.
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| HTTP request path to match | Length: 1-256 | Match string against the path of a incoming HTTP request. See below for information on how to use wildcards. | "" |
| Format | RAW, JSON, XML, CSV, TEXT, Application Form URL Encoded | If content-type is not found on the request headers this options will be used as best effort. | RAW |
| Verb | ALL, GET, POST, PUT, PATCH, DELETE | To only allow a certain verb type. ALL allow all verbs | ALL |
| Target Property | Length 1-64. | If formatting was done the result will be written to this property on the message. | data |
| Send HTTP response automatically | boolean | Uncheck this if you want to use the HTTP Response module later on in the flow, for custom payloads. | true |
The Path accepts wildcards.
"+" is single-level
"#" is multi-level
Settings Example:
| Path | URL | Match |
|---|---|---|
| foo/bar | foo/bar | true |
| foo/+/baz | foo/bar/baz | true |
| foo/+/bar/baz | foo/bar/baz | false |
| foo/bar/# | foo | false |
| foo/bar/# | foo/bar/baz/boo | true |
Input
This module is triggered by an external HTTP request matching the specified path.
Output
The following properties will be present in the output message, when a valid HTTP request has been received.
| Name | Type | Description |
|---|---|---|
| path | string | The path name of the HTTP request |
| body | byte[] | The actual payload of the HTTP request. |
| headers | dictionary<string,string> | HTTP headers |
| query | dictionary<string,string> | The query string of the HTTP request |
| verb | string | The VERB of the request |
| statusCode | int | The status code used in the response |
Examples
Some basic POSTS using CURL.
POST application/x-www-form-urlencoded
Settings:
HTTP request path to match: foo Target Property: data Allowed Verb: ALL Send response automatically: true
CURL:
curl -d "param1=value1¶m2=value2" -X POST http://localhost:9090/foo
Output to next module:
Curl will get a 200 OK back since we had Send response automatically: true.
{
"crosser": {
"success": true
},
"data": {
"body": {
"param1": "value1",
"param2": "value2"
},
"headers": {
"accept": "*/*",
"content-length": "27",
"content-type": "application/x-www-form-urlencoded",
"host": "localhost:9090",
"origin": "localhost:9090",
"user-agent": "curl/7.81.0"
},
"path": "foo",
"query": {},
"verb": "POST",
"statusCode": 200
}
}
POST JSON
This is similar to the example above, but we have Send response automatically: false and this makes it possible to add the HTTP Response module later in the flow.
Settings:
HTTP request path to match: foo Target Property: data Allowed Verb: ALL Send response automatically: false
CURL:
curl --data '{"tool": "curl"}' --header "Accept: application/json" --header "Content-Type: application/json" http://localhost:9090/foo
Output to next module:
Since we did not have Send response automatically: true curl will get a timeout unless you also add the HTTP Response module later on in the flow.
{
"$httpRequestId": "ca5c3807-f4ef-41fc-b293-d841c2b3a2cf",
"crosser": {
"success": true
},
"data": {
"body": {
"tool": "curl"
},
"headers": {
"accept": "application/json",
"content-length": "16",
"content-type": "application/json",
"host": "localhost:9090",
"origin": "localhost:9090",
"user-agent": "curl/7.81.0"
},
"path": "foo",
"query": {},
"verb": "POST",
"statusCode": 200
}
}
Search Documentation
Protocols