View Full Version : Communicating with API

15 Feb 2011, 11:41 AM
I am developing an app that will be deployed using PhoneGap. However, my question is related to how I should be communicating with our backend API.

The API has different URLs depending on the needed action, and accepts / returns JSON.

For my Authentication call the API returns a session ID which I must use for all future requests. What is the best way to call this, store the session ID locally, and use it in all future requests?

Do I create a Store for each needed API request - because the passed data and URL will be different?
Do I create a Store and then modify its proxy: { url: } attribute for each call?