add option to return XML instead of POSTing it