Proxy request parameter

This forum contains topics that were moved from Get Satisfaction
Robby7162863
Posts: 0
Joined: Sun Oct 12, 2014 7:43 pm

Proxy request parameter

Post 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]

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Proxy request parameter

Post by Kateryna Grynko »

Hi Robby,

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

Robby
Posts: 0
Joined: Wed Jun 25, 2014 2:21 pm

Proxy request parameter

Post 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//

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Proxy request parameter

Post 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.

Robby7162863
Posts: 0
Joined: Sun Oct 12, 2014 7:43 pm

Proxy request parameter

Post by Robby7162863 »

Ok, thx it works now.

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Proxy request parameter

Post by Evgene Karachevtsev »

Robby,

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

Post Reply