Refactor http test methods up into AbstractHttpResourceTestCase so all modules can use them, and added some additional helpers for different formats