rest api accept both json and xml