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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how put the body in trestclient and loop the body with multiple values

I have a data that consists of many names

and the body is like

{

"name":"names"

}

these names consists of many values that i am getting from the database

and then post those names into website i am using the flow like

tpostgrsqlinput ---->tmap------>twritejsonField------->trestclient------->tlogrow

in trestclient i am using post method

and i dont know where to write the body data and it should be looping after every data is posted

like after posting one name value ex:mukesh

it should loop and post the next value ex:antony

and so on 

Labels (3)
28 Replies
Anonymous
Not applicable
Author

i tried to pass one value but it showing an error like in the same thing previously mentioned

and atleast can i know how to pass the body data 

like in postman we use the body data in that raw and in raw we write the code

like

{

"name":"mukesh"

}

like this type is there any way in posting the data in talend

 

manodwhb
Champion II
Champion II

@mukeshmsp96 , you need to pass this way in talend. since double quotes need to escape otherwise it will not treat 

 

{

\"name\":\"mukesh\"

}

Anonymous
Not applicable
Author

in http heard of trest i have passed the values like

{

\"name\":\"mukesh"\

}

it was showing an error "ue cannot be resolved to a variable"

manodwhb
Champion II
Champion II

@mukeshmsp96 ,

 

not like 

{

\"name\":\"mukesh"\

}

 

correct one is 

{

\"name\":\"mukesh\"

}

Anonymous
Not applicable
Author

sorry it was a typing mistake i have given in the same format only 0683p000009MA1p.png

manodwhb
Champion II
Champion II

@mukeshmsp96 ,Body should be in double quote

"{

\"name\":\"mukesh\"

}

"

Anonymous
Not applicable
Author

tried it before only i was getting  an error like this


[statistics] connecting to socket on port 3824
[statistics] connected
error code: 1010|403
[statistics] disconnected

manodwhb
Champion II
Champion II

@mukeshmsp96 , as the API developer to know and understand the API payload and response.

Anonymous
Not applicable
Author

actually it's working fine in postman if i give the body in 

{

"name":"mukesh"

}

if you have any idea of using another component so that i can pass the body along with the post request