What's the difference between using application/csv
vs text/csv
as the HTTP Accept Header?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
This question already has answers here:
Closed 6 years ago.
回答1:
A MIME type is used so software ( like a browser for example ) can know how to handle the data.
If a server says "This data is of type text/csv" the client can understand that can render that data internally, while if the server says "This data is of type application/csv" the client knows that it needs to launch the application that is registered on the OS to open csv files.
text/csv is more generic.
回答2:
text/csv
is more appropriate because application
as a first part implies some interactivity. Your text file not being interactive, it should be announced as text.