Skip to content

没有办法设置 responseType: "blob" 吗? #223

Closed Answered by JOU-amjs
fengshancui asked this question in Q&A
Discussion options

You must be logged in to vote

这个是需要按你使用的请求适配器而定的,如果使用的是XMLHttpRequest适配器和axios适配器,是可以这样设置的,因为XMLHttpRequest和axios都支持这个参数。
但如果使用的是GlobalFetch,它内部是用fetch API实现的,那你就得通过response.blob()来获取

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fengshancui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants