You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I am trying to connect to the github api through a siddhi app using the bellow code,
@app:name("RequestResponseSample") @app:description('This sample siddhi app demonstrates how to use transport properties along with request sink and response source')
Description:
I am trying to connect to the github api through a siddhi app using the bellow code,
@app:name("RequestResponseSample")
@app:description('This sample siddhi app demonstrates how to use transport properties along with request sink and response source')
define stream regStream (id String);
@sink(type='http-request', publisher.url='http://api.github.com/repos/wso2/product-sp/releases',
method='POST',
chunk.disabled='true',
sink.id='reg-company',
@Map(type='json', @payload("""{"id":"{{id}}"}""")))
define stream requestStream (id string);
-- source to receive successful responses (which have 2xx status codes)
@source(type='http-response' , sink.id='reg-company', http.status.code='200',
@Map(type='json', @attributes(tag_name='$.tag_name')))
define stream responseStream(tag_name string);
-- source to receive the responses with 4xx status codes
@source(type='http-response' , sink.id='reg-company', http.status.code='403' ,
@Map(type='text', regex.A='((.|\n)*)', @attributes(message='A[1]')))
define stream responseStream4xx(message string);
@sink(type='log')
define stream logStream(tag_name string);
from regStream
select id
insert into requestStream;
from responseStream
select *
insert into logStream;
But I am not getting a response. It displays an error message saying that the channel is inactive
Bellow is the response I received when I requested through "Postman"
@minudika
The text was updated successfully, but these errors were encountered: