Added helpers to turn responses into json/xml