First cut. Storing the response/request pair on the filesystem using a one way hash as the identifier for the particular request.Still does not work for custom headers which forces xml/json response
Not caching the login and logout requests and storing the login cookies to pass around with all the other requests. This seems to work well with our iphone app.
cleaning code. Removed console.logs. Also removed temp.js