I've tried using JS's copy() and creating an element/populating it with the data/copying the result. I cannot figure out how to get the response.text() to the clipboard.
The actual fetch is an XHR but the below example should suffice:
fetch('/readme.txt')
.then(response => response.text())
.then(data => console.log(data));