I have an endpoint: getHtmlContent
in my Java code.
It returns me a String with actual HTML code e.g.: <pre>Hello world \n Line 2 </pre>
On my web page I have two options: View, and Download.
When the user clicks on Download, I will call getHtmlContent
endpoint that will get me actual HTML content as String.
How do I write that response to a file such that the user is actually able to download the content as content.html file?
How do I render the View option?