The siddhi-io-http extension is an extension to Siddhi that allows you to receive and publish events via http and https transports and also allow you perform synchronous request and response. This extension works with WSO2 Stream Processor and with standalone Siddhi.
Find some useful links below:
Latest API Docs is 2.0.4.
Using the extension in WSO2 Stream Processor
-
You can use this extension with the latest WSO2 Stream Processor that is a part of the WSO2 Analytics offering, with editor, debugger and simulation support.
-
This extension is shipped with WSO2 Stream Processor by default. If you need to use an alternative version of this extension you can replace the component jar that can be found in the
<STREAM_PROCESSOR_HOME>/lib
directory with the component jar of the relevant version.
Using the extension as a java library
- This extension can be added as a maven dependency to your project together with other Siddhi dependencies.
<dependency>
<groupId>org.wso2.extension.siddhi.io.http</groupId>
<artifactId>siddhi-io-http</artifactId>
<version>x.x.x</version>
</dependency>
Branch | Build Status |
---|---|
master |
- http (Sink)
This extension publish the HTTP events in any HTTP method POST, GET, PUT, DELETE via HTTP or https protocols. As the additional features this component can provide basic authentication as well as user can publish events using custom client truststore files when publishing events via https protocol. And also user can add any number of headers including HTTP_METHOD header for each event dynamically.
Following content types will be set by default according to the type of sink mapper used.
You can override them by setting the new content types in headers.
- TEXT : text/plain
- XML : application/xml
- JSON : application/json
- KEYVALUE : application/x-www-form-urlencoded - http-request (Sink)
This extension publish the HTTP events in any HTTP method POST, GET, PUT, DELETE via HTTP or https protocols. As the additional features this component can provide basic authentication as well as user can publish events using custom client truststore files when publishing events via https protocol. And also user can add any number of headers including HTTP_METHOD header for each event dynamically.
Following content types will be set by default according to the type of sink mapper used.
You can override them by setting the new content types in headers.
- TEXT : text/plain
- XML : application/xml
- JSON : application/json
- KEYVALUE : application/x-www-form-urlencoded
HTTP request sink is correlated with the The HTTP reponse source, through a uniquesink.id
.It sends the request to the defined url and the response is received by the response source which has the same 'sink.id'. - http-response (Sink)
HTTP response sink is correlated with the The HTTP request source, through a unique
source.id
, and it send a response to the HTTP request source having the samesource.id
. The response message can be formatted intext
,XML
orJSON
and can be sent with appropriate headers. - http (Source)
The HTTP source receives POST requests via HTTP or HTTPS in format such as
text
,XML
andJSON
. In WSO2 SP, if required, you can enable basic authentication to ensure that events are received only from users who are authorized to access the service. - http-request (Source)
The HTTP request is correlated with the HTTP response sink, through a unique
source.id
, and for each POST requests it receives via HTTP or HTTPS in format such astext
,XML
andJSON
it sends the response via the HTTP response sink. The individual request and response messages are correlated at the sink using themessage.id
of the events. If required, you can enable basic authentication at the source to ensure that events are received only from users who are authorized to access the service. - http-response (Source)
The http-response source co-relates with http-request sink with the parameter 'sink.id'.
This receives responses for the requests sent by the http-request sink which has the same sink id.
Response messages can be in formats such as TEXT, JSON and XML.
In order to handle the responses with different http status codes, user is allowed to defined the acceptable response source code using the parameter 'http.status.code'
-
Report issues at GitHub Issue Tracker.
-
Send your contributions as pull requests to the master branch.
-
Post your questions with the "Siddhi" tag in Stackoverflow.
-
Siddhi developers can be contacted via the following mailing lists:
Developers List : [email protected]
Architecture List : [email protected]
-
We are committed to provide support for this extension in production. Our unique approach ensures that all support leverages our open development methodology, and is provided by the very same engineers who build the technology.
-
For more details and to take advantage of this unique opportunity contact us via http://wso2.com/support/.