Michael Iglesias
Posts: 0
Joined: Tue Jul 23, 2013 8:51 pm

REST GET Request - Pass Variable in URL Issues

Image

This is a screen shot of my "Start Screen" Events. I am setting the "tnt_id" local storage variable event on page load and then invoking a javascript function which alerts the "tnt_id". This is working as expected when testing the app.

Let me try and return 1, although I did add
return localStorage.getItem('tnt_id');

which apparently isn't working.

Michael Iglesias
Posts: 0
Joined: Tue Jul 23, 2013 8:51 pm

REST GET Request - Pass Variable in URL Issues

Didn't work when I returned 1.

Although it does execute an alert statement. I still don't think that {tnt_id} is being replaced with the local storage variable or the manually return 1

Michael Iglesias
Posts: 0
Joined: Tue Jul 23, 2013 8:51 pm

REST GET Request - Pass Variable in URL Issues

Is there any way in which you can log into the app editor and see if you can spot anything that is wrong?

I have literally tried everything over the hours I've spent trying to figure this thing out :(

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST GET Request - Pass Variable in URL Issues

Sure, share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST GET Request - Pass Variable in URL Issues

The service was failing to invoke as it doesn't support cross-domain calls. It works fine with Appery.io proxy on.

http://docs.appery.io/documentation/c...

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

REST GET Request - Pass Variable in URL Issues

Hi Michael,

Your service returns 404 with this address:prehttp://162.243.56.184/api/index.php/packages/pre
You should use the following service URL:prehttp://162.243.56.184/api/index.php/packages/{my_id}/pre

Add Request parametert 'my_id' and pass there your ID. Appery.io will automatically replace {my_id} in URL with your number.

Michael Iglesias
Posts: 0
Joined: Tue Jul 23, 2013 8:51 pm

REST GET Request - Pass Variable in URL Issues

Katya & Max,

Everything is working fine now. I wasn't aware that I had to turn on "Appery.io Proxy"

I really appreciate your help and assistance. Appery.io Support is second to none!

Thanks again,
Michael

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

REST GET Request - Pass Variable in URL Issues

Michael,

Glad it's working!

Return to “Issues”