I\'m writing a web application API, where when someone accesses a URL, it returns text data. I set the content-type to \"text/plain\", but when I access it with Chrome, it down
It sounds like you may be running into Chrome Issue 106150. Chrome apparently (sometimes) decides to use "sniffing" logic when the content-type is text/plain.
Possible workarounds:
X-Content-Type-Options: nosniff
header.