getazzio
Posts: 0
Joined: Tue Dec 10, 2013 2:58 pm

Accessing local rest server - Possible?

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Accessing local rest server - Possible?

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.

getazzio
Posts: 0
Joined: Tue Dec 10, 2013 2:58 pm

Accessing local rest server - Possible?

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?

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

Accessing local rest server - Possible?

Hi,

Are there any console errors (F12)?

getazzio
Posts: 0
Joined: Tue Dec 10, 2013 2:58 pm

Accessing local rest server - Possible?

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?

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

Accessing local rest server - Possible?

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.

getazzio
Posts: 0
Joined: Tue Dec 10, 2013 2:58 pm

Accessing local rest server - Possible?

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?

getazzio
Posts: 0
Joined: Tue Dec 10, 2013 2:58 pm

Accessing local rest server - Possible?

Sorry, my last message was premature:

I tried the application in the testing environment within Appery.io, and got the following screenshot:

Image

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

Accessing local rest server - Possible?

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.

Return to “Issues”