Page 1 of 1
Accessing local rest server - Possible?
Posted: Tue Dec 10, 2013 2:58 pm
by getazzio
Greetings,
The problem I am facing is trying to access a local RestServer through an appery.io application. I understand that since the Rest server is local, I am unable to utilize the built in rest-service functionality of appery.io, is this a correct assumption?
Is there any way round this, or will I have to utilize javascript to implement digest-authorization in an appery.io application?
Any help regarding this problem will be much appreciated, thanks.
Accessing local rest server - Possible?
Posted: Tue Dec 10, 2013 4:56 pm
by Illya Stepanov
Hello,
If you have on your computer locally running server and you can reach it through the browser (by entering the appropriate address in browser), then on this computer you can use built in rest-service functionality in Appery.io.
But you can't use Appery.io proxy (but I think you will not need it, as you can pre-define in your service header 'access-control-allow-origin'). And you can't use tab Test service, but I think it's also not a big problem.
Accessing local rest server - Possible?
Posted: Wed Dec 11, 2013 7:24 am
by getazzio
Hi Illya,
Thanks for the reply. I can reach the server through the browser, but let me specify what I am doing and see if you can shed any light on troubleshooting:
I have defined the get requests for the service and bound it to a button in the application. I then download this application as HTML/JSS/CS Other platforms file. When running this application in the browser, however, I get no "activity" on the server side when using Wireshark to sniff http:// get requests..
What am I doing wrong?
Accessing local rest server - Possible?
Posted: Wed Dec 11, 2013 11:49 am
by Kateryna Grynko
Hi,
Are there any console errors (F12)?
Accessing local rest server - Possible?
Posted: Thu Dec 12, 2013 9:17 am
by getazzio
Hi Katya,
No, none at all. The rest-server in question user digest-authentication, should I implement some sort of header in the rest-service in the Appery.io application?
Accessing local rest server - Possible?
Posted: Thu Dec 12, 2013 2:02 pm
by Kateryna Grynko
Hi,
No. Use only parameters you need for your local server. Can you see requests to your server in Network tab (F12)? Please post a screenshot of Network tab.
Accessing local rest server - Possible?
Posted: Wed Dec 18, 2013 9:55 am
by getazzio
Nothing is displayed on the Network tab.
Let me now be a bit more specific:
I have a very simple application at the moment to test if it actually accesses the server. I have a caption and a button. A button-click event is added to the application, where upon clicking the button the Controller_Login service is invoked, where the URL is specified as http://10.47.89.95 and the get method (xml) is used with the parameters username and password.
Anything seem incorrect about this setup so far?
Accessing local rest server - Possible?
Posted: Wed Dec 18, 2013 10:12 am
by getazzio
Sorry, my last message was premature:
I tried the application in the testing environment within Appery.io, and got the following screenshot:
Accessing local rest server - Possible?
Posted: Wed Dec 18, 2013 12:48 pm
by Maryna Brodina
Hello! As we can see from the screenshot request is sent (lower request is red). Open details (click on it's name) and check why it fails.