Page 1 of 1

Proxy request parameter

Posted: Sun Oct 12, 2014 7:43 pm
by Robby7162863

Hi,

I have a rest service defined "[url=http:///{password}/{command}]http:///{password}/{command}[/url]" with the appery proxy enabled.
I'm trying to call the service via javascript:

restservice1.execute({
data: {
'command': 'get-sensors',
'password': 'test'
}
});

But the proxy doesn't send the request parameters to my rest service according to the browser debugging tools ? It only uses the url without the request parameters.
[url=http:////]http:////[/url]


Proxy request parameter

Posted: Mon Oct 13, 2014 9:56 am
by Kateryna Grynko

Hi Robby,

You added an extra slash in URL parameter. Please check the errors in console, they should be helpful.


Proxy request parameter

Posted: Mon Oct 13, 2014 11:07 am
by Robby

No, I didn't. The forum editor removed a tag I placed in the url. The url I use is:
http://domain/{password}/{command}

The proxy service only sends the url without the parameters:
http://domain//


Proxy request parameter

Posted: Tue Oct 14, 2014 1:27 am
by Yurii Orishchuk

Hi Robby,

I have tested it and it works:

1 service settings: http://prntscr.com/4vywyp/direct

2 service request: http://prntscr.com/4vyxod/direct

3 invoke service from app with following code:

pre

echo1.execute({body: {param1: 123} })

/pre

4 open browser debugger on network tab and find this request.
There you should see modified URL: http://prntscr.com/4vyytg/direct

Regards.


Proxy request parameter

Posted: Tue Oct 14, 2014 8:24 pm
by Robby7162863

Ok, thx it works now.

Maybe you could add this to the docs for other users:
http://devcenter.appery.io/documentat...


Proxy request parameter

Posted: Tue Oct 14, 2014 8:31 pm
by Evgene Karachevtsev

Robby,

Thank you for the update, we'll pass your request to our managers.