lloydstone/femah — pull request #45 by lholman (2014-02-28 09:23:18+00:00)
Title: #24 API integration to support Admin UI and basic use cases

- Refactored FemahApiHttpHandler.BuildApiRequest method out in to
separate ApiRequestBuilder class.
- Modified ApiRequestBuilder to require Content-Type header be set to
'application/json' or throw a 415 'Unsupported Media Type HTTP status
code' for all PUT operations
(http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#json-requests)
- Refactored some complex API tests in to ApiRequestBuilder specific
unit tests, simplifying the tests (set the existing tests to ignore as
we can probably use them for integration tests further down the line).
- Refactored ProcessApiGetRequest and ProcessApiPutRequest methods out
from the FemahApiHttpHandler and in to their own class
ProcessApiRequest, mainly to ease testing.
- Added utility DeSerialiseJsonBodyToFeatureSwitch() method to
ProcessApiRequest class to deserialise the Json body provided by PUT
requests