-
1. Re: Rest Service Post Method - How to pass multiple input parameters?
rareddy Jun 14, 2018 9:31 AM (in response to cm.kumar)Read about "post" methods here REST Service Through VDB · GitBook
An example of FORM based call HTML form method Attribute
The way you are doing above in your example is like single Payload, Teiid does not support any parsing capabilities on top of Payload into their respective parameters, that needs to be consumed as is, then if you want you can parse them in your stored procedure into respective parameters. See also how to do multipart/form-data html - What does enctype='multipart/form-data' mean? - Stack Overflow
-
2. Re: Rest Service Post Method - How to pass multiple input parameters?
cm.kumar Jun 18, 2018 4:19 AM (in response to rareddy)Ramesh,
Further to make myself clear, i'm having 3 parameters in my SP and I'm passing 3 parameters as form/data to call the rest service via post method.
Are you saying, I should have only one parameter in SP (which is like xml) and parse it in SP to get individual parameters and do what is needed?
Thanks.
-
3. Re: Rest Service Post Method - How to pass multiple input parameters?
rareddy Jun 18, 2018 9:22 AM (in response to cm.kumar)What I am saying is currently the auto-generated REST War from VDB in Teiid only accepts the "FORM" based post, and if one of the parameters large like file then you need to use multipart-form. Look at above examples to see how the payload need to be constructed. In FORM based payloads the web frameworks convert the payload into individual parameters as in GET call. You can send more than one parameter. If you want to send a single JSON document, then I suggest configuring your procedure that takes a single clob/blob then parse the contents.
Ramesh..