guardian/frontend — pull request #1391 by janua (2013-08-14 14:24:54+00:00)
Title: Facia contentapi client

This creates a new ContentApi client for use in the facia application.

I have created a new client so that the current client for mobile remains unchanged.

I am not happy with the defaults on the client. Did you know that it has a default maxConnections of 10? This doesn't match a default `connection timeout of 1000` and a default `request timeout of 2000`, because they constantly timeout on the default maxConnections of 10.

The value of these variables is up for debate. You could leave the maxConnections to 10 and increase the timeout, or you could decrease the max connections to 1 and let them all queue. I think the latter is a better default, and do not notice the front loading any slower on only using one connection.

I have only changed `maxConnections`, but have added the other defaults alongside it so they are visible to everyone.

I think it would be good if we also changed the original ContentApi client, so that we all use the same one.