Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
@manodwhb but also i am getting an error same as the above mentioned one
@mukeshmsp96 , please check for the error in code tab? you need to create body context variable.
It's working but not posting any data to the website
instead its giving the error code :1010 in the tlog row output
@mukeshmsp96 , which means may the api is might have issue to connect or content not set in the component.
what "value" should be given in context wit the name "body"
and the output and error are like this
{"name":"{"name":"mukesh"}"}
error code: 1010|403
{"name":"{"name":"john"}"}
error code: 1010|403
{"name":"{"name":"robert"}"}
error code: 1010|403
{"name":"{"name":"abdul"}"}
error code: 1010|403
in the above is passing like
{"name":"{"name":"mukesh"}"}
but i wanted to pass like
{"name":"mukesh"}
{"name":"john"}
{"name":"robert"}
{"name":"abdul"}
to the website and this is the format of my website api body
below are my trest and the context data
@mukeshmsp96 , as per your code you were passing {"name":"mukesh"} to rest component,not sure how it was.
try to remove pass only name assign to body context and pass it,may your rest api is accepts only the value like name and the rest of this it is generating its own.
i have tried but also its giving an error
and first i tring to pass only the single value manually then it showed
like this
400|{"name":["This field is required."]}
i think we have to pass only the value in place of ["this field is required"]