exchange JSON and XML data using REST with authentication