Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
root
Creator II
Creator II

Get and POST do not work in tRESTRequest

I am trying to create a webservice to create new users and to list user details

a. POST --> http://localhost:8088/users
This creates a new user
b. GET --> http://localhost:8088/users/{id}/
This fetches the user details from DB and sends a JSON object

in tRestRequest, I have first service a (POST), followed by service b (GET).

the USER creation (service a) works perfectly fine. When I try to do Sevice b (GET), it gives an error:


Exception in component tRESTResponse_7
java.lang.RuntimeException: Rest response already sent.


I see that the "service a" is also executed and creates a user (I know, blank details, no validations added)... and the second service fails.

What am I doing wrong here?
Labels (5)
2 Replies
Anonymous
Not applicable

Hi 
Take a look at this related topic, I think it must generate multiple records to tRestResponse.

Regards
Shong
Anonymous
Not applicable

Are you trying to do it from within a single flow inside a job ? This error message would typically be displayed if a job tried to send some extra response data after the endpoint has already processed the first and only possible (by default) response. To support multiple responses for a single flow one needs to enable  'streaming' for the current flow in a tRESTRequest URL table
Sergey