使用AsyncHttpClient下载图片出现org.apache.http.client.HttpResponseException: Content-Type not allowed!

来源:互联网 发布:网络包工头 编辑:程序博客网 时间:2024/06/03 17:39

使用AsyncHttpClient下载gif图片出现org.apache.http.client.HttpResponseException: Content-Type not allowed!错误

原因:制定文件下载类型时,没有指定gif类型

 解决方法:

// 指定文件类型String[] allowedContentTypes = new String[]{"image/png", "image/jpeg", "image/gif"};

0 0
原创粉丝点击