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: 
praneeths
Contributor II
Contributor II

Pass List of values to Post Method using Trestclient

I am trying to send a request body to tRestClient in the below format

{"x" : [1,2,3], "y" : [] }

I am using txml map to prepare the body and send a request, it is being sent as  string type not as a list type

{"x" : "[1,2,3]", "y" : "[]" }

 

Labels (4)
2 Replies
jeoste
Creator II
Creator II

Hello,
Either you can see if the parameters exist for tXMLMap, either after creating this data, use java routine replaceAll to change "[]" by []

praneeths
Contributor II
Contributor II
Author

TrestClient is expecting the below format

<?xml version="1.0" encoding="UTF-8"?>
<root>
<x>
<element>19323</element>
<element>19324</element>
</y>
<y/>
</root>

I am sending the request as 
<?xml version="1.0" encoding="UTF-8"?>
<root><x>"[19323,19324]"</x></root>

 

Its a challenge, how to handle