Chris Thornton
Posts: 0
Joined: Wed Aug 14, 2013 1:27 pm

Proxy in Appery

I think the "User-agent" is information that I'm passing to Basecamp in order to get the API.
So this "user-agent" is a parameter put into the request of the service. Another parameter I need to have is Authorization. That has a set default that is a base64 of my username:password- which gives me:

Basic username(encoded):(password(encoded)
as the default value for Authorization.

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

Proxy in Appery

Hi, don't tick "Header" for User-agent parameter. It forms and transmits automatically. Delete it from Request parameters. Header parameter Authorization should have Basic dXNlcjpwYXNz content type, where dXNlcjpwYXNz - base64 encoded string which includes user name and password separated by colon. For example user:pass

[quote:]The problem seems when I create an event after a complete service to set a variable. The variable is not being saved.[/quote] - could you explain in more details? Screenshot and code you use would help a lot.

Chris Thornton
Posts: 0
Joined: Wed Aug 14, 2013 1:27 pm

Proxy in Appery

Ok, deleted the "user agent" as a parameter from the service's request. The service still tests and gives a response without it. So I guess I didn't need it.

Now there are no errors in the console when I test the app.

However, I set an event that when the RESTservice is complete, a variable is stored. This variable is still not being stored, and I can't for the life of me figure out why.

Any Help?

Chris Thornton
Posts: 0
Joined: Wed Aug 14, 2013 1:27 pm

Proxy in Appery

Hi Marina,

Taken a couple of screen shots. The first one shows the service being invoked when this homePage loads.
Image

So, then in the data tab, I've simply asked that when that invoked service is complete, I want the Project URL (shown in the design screen) to be stored as a variable (for a simplified test that didn't work I called this "regurgitate").
Then after that I wanted to set that variable to the label also called regurgitate. (shown in the screen shot below)
Image

Yet, when I test it, the service works, so the title and the project URL are put in. But this stages that involve the varriable don't work at all.

Does this explain my problem. Anything else you need from me let me know.

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

Proxy in Appery

As we can see from the screenshot on service Complete you want to set localStorage variable and bind it to Label value ShowProjectUrl. Most likely you also map collection values from service responce to llist. It won't work this way because on page will be a few labels with the same name (as many as values in response) and it's not clear what label you use to bind to localStorage variable. You would need to determine what is localStorage variable should be equal to and it would be easier to understand what to do next.

Return to “Issues”