Reynaldo Libutan
Posts: 0
Joined: Fri May 01, 2015 6:54 am

How to POST javascript object to service?

For example I have created a service like below

Image

and I have a javascript object like

code
var param = {
// has a lot of fields
// some fields are arrays of objects
}
/code

How do i use codeparam/code like below?

code
myServiceInst.execute({
parameters: {
// how do I use it here???
// for non-obj fields i just use something like below
// field: value
},
success: function(response) {
console.log(response);
},
error: function() {
alert("No internet connection or a server error occured.");
}
});
/code

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

How to POST javascript object to service?

Hi Reynaldo,
Please look at example below:
code
myServiceInst.execute({
parameters: param,
...
/code

Reynaldo Libutan
Posts: 0
Joined: Fri May 01, 2015 6:54 am

How to POST javascript object to service?

Hi, I tried what you suggested but I am getting this error.

Image

Reynaldo Libutan
Posts: 0
Joined: Fri May 01, 2015 6:54 am

How to POST javascript object to service?

I found out that in the function code__performParametersSubstitutions()/code of codeappery.js/code the code fails because

  1. my codeparam/code object has a non string property (easily fixed but still annoying)

  2. my codeparam/code object has a property of an array of objects

    Any tips how can I include this complex object as param for my service?

Reynaldo Libutan
Posts: 0
Joined: Fri May 01, 2015 6:54 am

How to POST javascript object to service?

Please remove the "answered" tag since this is obviously still unanswered.
Please see additional details below.

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

How to POST javascript object to service?

Please share - http://devcenter.appery.io/documentat... your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue

Return to “Issues”