Page 1 of 1
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 5:37 pm
by ssquire
I have a database with multiple items (4) in it, that I modeled from the Appery.io CRUD example. I have a List Component on my page that will hold the items in my database when the service is invoked. My only issue is that when I create my Success event map for service response - instead of seeing body - $ - $ as in the CRUD List Service example, I'm seeing body - $ - requestParams & requestBody for Service response (see attached). Why is this?
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 8:18 pm
by Serhii Kulibaba
Hello Steven,
Please clarify, have you created that service manually? It seems these response parameters were added on the service settings tab
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 8:41 pm
by ssquire
Yes I did create it manually. When you say they were added on the service settings tab what do you mean Sergiy?
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 9:23 pm
by Serhii Kulibaba
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 9:45 pm
by ssquire
I deleted both requestParams and requestBody from that page and recreated the service but I'm still just getting a '$' not '$'. Why is this? The service responds with all items in the database when tested.
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 9:49 pm
by ssquire
Is there some kind of problem where if I have assigned a request parameter at some point in time it will no longer recognize an array?
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 9:52 pm
by Serhii Kulibaba
Could you please provide us with more details, screenshots or exact steps to reproduce this problem?
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Wed Jan 11, 2017 9:54 pm
by ssquire
I guess to make it more clear, after having created a requestParams/Body manually, even if I delete the service, delete requestParams and requestBody, then add the service to the page again - I never get a $ only a $. Is this fixable?
Receiving Request Body, Request Params instead of $[i] When Mapping Service
Posted: Thu Jan 12, 2017 3:45 pm
by Serhii Kulibaba
Please add a response structure as an array of objects, see the attachment below: