Siddhi IO HTTP
The siddhi-io-http extension is an extension to Siddhi that receives and publishes events via HTTP and HTTPS transports, calls external services, and serves incoming requests and provide synchronous responses.
For information on Siddhi and it's features refer Siddhi Documentation.
Download
- Versions 2.x and above with group id
io.siddhi.extension.*
from here. - Versions 1.x and lower with group id
org.wso2.extension.siddhi.*
from here.
Latest API Docs
Latest API Docs is 2.2.2.
Features
- http (Sink)
HTTP sink publishes messages via HTTP or HTTPS protocols using methods such as POST, GET, PUT, and DELETE on formats
text
,XML
andJSON
. It can also publish to endpoints protected by basic authentication or OAuth 2.0. - http-call (Sink)
The http-call sink publishes messages to endpoints via HTTP or HTTPS protocols using methods such as POST, GET, PUT, and DELETE on formats
text
,XML
orJSON
and consume responses through its corresponding http-call-response source. It also supports calling endpoints protected with basic authentication or OAuth 2.0. http-request (Sink)
(Use http-call sink instead).
The http-request sink publishes messages to endpoints via HTTP or HTTPS protocols using methods such as POST, GET, PUT, and DELETE on formatstext
,XML
orJSON
and consume responses through its corresponding http-response source. It also supports calling endpoints protected with basic authentication or OAuth 2.0.http-response (Sink)
(Use http-service-response sink instead).
The http-response sink send responses of the requests consumed by its corresponding http-request source, by mapping the response messages to formats such astext
,XML
andJSON
.- http-service-response (Sink)
The http-service-response sink send responses of the requests consumed by its corresponding http-service source, by mapping the response messages to formats such as
text
,XML
andJSON
. - http (Source)
HTTP source receives POST requests via HTTP and HTTPS protocols in format such as
text
,XML
andJSON
. It also supports basic authentication to ensure events are received from authorized users/systems.
The request headers and properties can be accessed via transport properties in the formattrp:<header>
. - http-call-response (Source)
The http-call-response source receives the responses for the calls made by its corresponding http-call sink, and maps them from formats such as
text
,XML
andJSON
.
To handle messages with different http status codes having different formats, multiple http-call-response sources are allowed to associate with a single http-call sink.
It allows accessing the attributes of the event that initiated the call, and the response headers and properties via transport properties in the formattrp:<attribute name>
andtrp:<header/property>
respectively. http-request (Source)
(Use http-service source instead).
The http-request source receives POST requests via HTTP and HTTPS protocols in format such astext
,XML
andJSON
and sends responses via its corresponding http-response sink correlated through a uniquesource.id
.
For request and response correlation, it generates amessageId
upon each incoming request and expose it via transport properties in the formattrp:messageId
to correlate them with the responses at the http-response sink.
The request headers and properties can be accessed via transport properties in the formattrp:<header>
.
It also supports basic authentication to ensure events are received from authorized users/systems.http-response (Source)
(Use http-call-response source instead).
The http-response source receives the responses for the calls made by its corresponding http-request sink, and maps them from formats such astext
,XML
andJSON
.
To handle messages with different http status codes having different formats, multiple http-response sources are allowed to associate with a single http-request sink. It allows accessing the attributes of the event that initiated the call, and the response headers and properties via transport properties in the formattrp:<attribute name>
andtrp:<header/property>
respectively.- http-service (Source)
The http-service source receives POST requests via HTTP and HTTPS protocols in format such as
text
,XML
andJSON
and sends responses via its corresponding http-service-response sink correlated through a uniquesource.id
.
For request and response correlation, it generates amessageId
upon each incoming request and expose it via transport properties in the formattrp:messageId
to correlate them with the responses at the http-service-response sink.
The request headers and properties can be accessed via transport properties in the formattrp:<header>
.
It also supports basic authentication to ensure events are received from authorized users/systems.
Dependencies
There are no other dependencies needed for this extension.
Installation
For installing this extension on various siddhi execution environments refer Siddhi documentation section on adding extensions.
Support and Contribution
-
We encourage users to ask questions and get support via StackOverflow, make sure to add the
siddhi
tag to the issue for better response. -
If you find any issues related to the extension please report them on the issue tracker.
-
For production support and other contribution related information refer Siddhi Community documentation.