title: Need to send data in PDF,CSV and HTML format from REST API. Should I send files Or send JSON?
body: <p>I am creating <strong>REST Api</strong> for a project using Spring MVC. On front end some reports are needed to be displayed in PDF, CSV and HTML format. Should I send JSON data to the front end for those reports and display the reports using some builtin plugins or doing it manually? Or should I send PDF,CSV and HTML files in response to the REST Api calls? I want maximum flexibility so what do you suggest?</p>