Page 1 of 1
how to use request parameters in a generic service
Posted: Wed Dec 11, 2013 1:21 am
by Bob Fludder
Hi. I've almost got the Generic Service thing worked out.. I can happily use it to read data from a service and populate an sqlite database. Want I need to do now is to go the other way. i.e. send the info back. To do this I'm guessing I need to set up some request parameters. I think I saw they need to go into request.data. I can't find any examples of what exactly is needed and how that matches to the parameter names when I do the mapping. Can you help please ?
how to use request parameters in a generic service
Posted: Wed Dec 11, 2013 2:06 am
by maxkatz
how to use request parameters in a generic service
Posted: Wed Dec 11, 2013 2:20 am
by Bob Fludder
Thanks Max. I did read that but it mostly talks about response parameters. I got that sorted (mostly from that link). Where i'm running into issues is it refers to "Request parameters you define will be available in settings.data". Just need to know a little more about how and what is in settings.data
how to use request parameters in a generic service
Posted: Wed Dec 11, 2013 2:26 am
by maxkatz
Let's say you defined a request parameter called 'email' in the Service editor. You can access it via settings.data.email.
how to use request parameters in a generic service
Posted: Wed Dec 11, 2013 2:29 am
by Bob Fludder
That means that, in this case, if I put something into settings.data.email it would be sent as part of the request to my webservice. Correct ?
how to use request parameters in a generic service
Posted: Wed Dec 11, 2013 3:45 am
by maxkatz