Java/Javascript read content-disposition file content

邮差的信 提交于 2019-12-25 05:17:14

问题


For my web site, I need to get some data from an URL whose response headers contains Content-Disposition attribute which forces me to download the file. I would like to know how I can read the content of the file without downloading the file to disk and do I/O to read it.
Doing so in either Java or JavaScript would be fine.


回答1:


Content-Disposition is just advisory. If you use a non-browser client (Java, curl, wget...) and do a GET request, you can just do whatever you want.

(I guess this means your question isn't sufficiently specific)



来源:https://stackoverflow.com/questions/22175946/java-javascript-read-content-disposition-file-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!