Page 1 of 1

dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 12:48 pm
by luke315774

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.


dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 1:36 pm
by Nikita

Hello,

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


dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 1:47 pm
by luke315774

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


dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 2:09 pm
by Nikita

Please, select request with an error to see it.


dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 2:26 pm
by luke315774

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.


dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 5:27 pm
by luke315774

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 ??


dynamic REST service URL parameter from Settings Service

Posted: Thu Mar 20, 2014 9:35 pm
by Maryna Brodina

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.


dynamic REST service URL parameter from Settings Service

Posted: Fri Mar 21, 2014 12:00 pm
by luke315774

Thank you for your patience. I appreciate your help.


dynamic REST service URL parameter from Settings Service

Posted: Mon Jul 20, 2020 3:28 pm
by luke315774

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