Issue 19412. Use client accept headers for return format in the api