luke315774
Posts: 0
Joined: Mon Mar 17, 2014 6:33 pm

dynamic REST service URL parameter from Settings Service

I've defined a service like this :

Image

The "url_restserver" parameter is define in the Settings service like this :

Image

At runtime, a programmatically set the parameter based on user input like this :

BergerSettings['url_restserver'] = BergerSettings['url_restserver_PRD'];

When I show the value in the console, BergerSettings['url_restserver'] has the correct value but when the service is invoked, it does not use the correct value. Am I doing it wrong?

Thanks for your help.

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

dynamic REST service URL parameter from Settings Service

Hello,

Please check network tab in browser. To what url request is sent?

luke315774
Posts: 0
Joined: Mon Mar 17, 2014 6:33 pm

dynamic REST service URL parameter from Settings Service

The request was sent to the URL I previously had set (without the dynamic parameter).

Now, strangely, it does not work at all. Here's a look at my network tab :

Image

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

dynamic REST service URL parameter from Settings Service

Please, select request with an error to see it.

luke315774
Posts: 0
Joined: Mon Mar 17, 2014 6:33 pm

dynamic REST service URL parameter from Settings Service

Alright I got it to "work" but still with the wrong URL... Here's screenshot from the network tab that show the url with "tst" but in the console tab you can see that it should be the "prd" that get loaded.

Before I made it dynamic, I had the "tst" url hardcoded in the service definition.

Image

Image

I appreciate your help.

luke315774
Posts: 0
Joined: Mon Mar 17, 2014 6:33 pm

dynamic REST service URL parameter from Settings Service

I just find that by removing the "Use Appery.io Proxy" option, the request is sent to the appropriate url. Can it be some sort of caching on the appery proxy ??

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

dynamic REST service URL parameter from Settings Service

Hello!
No, there is no caching. You can check where request goes when proxy is enabled in console on Network tab--Headers parameter appery-proxy-url.

luke315774
Posts: 0
Joined: Mon Mar 17, 2014 6:33 pm

dynamic REST service URL parameter from Settings Service

Thank you for your patience. I appreciate your help.

luke315774
Posts: 0
Joined: Mon Mar 17, 2014 6:33 pm

dynamic REST service URL parameter from Settings Service

I updated my settings to put only the ""prd"" url so that it would obviously not work if I use any other url... :

a href=""https://d2r1vs3d9006ap.cloudfront.net/s ... 1395328201"" rel=""nofollow""Imagehttps://d2r1vs3d9006ap.cloudfront.net/s ... 1395328201"" /a

When I run the app

Return to “Issues”