我正在从内容模块下载 2 种类型的文件,图片和视频。如何在我的应用程序中读取收到的标题“Content-Type”(图像/jpg 或视频/mp4)并能够根据文件类型采取相应措施?
这是我可以在控制台中阅读的内容:
**
<QBASIHTTPRequest: 0xe10bc00>
headers:{
"Accept-Ranges" = bytes;
"Content-Length" = 361902;
**"Content-Type" = "image/jpg";**
Date = "Wed, 06 Nov 2013 11:27:35 GMT";
Etag = "\"2b685b3ebfa38317a5dc8551db743028\"";
"Last-Modified" = "Wed, 06 Nov 2013 11:27:19 GMT";
Server = AmazonS3;
"x-amz-id-2" = "uta4GqIvFbTzZxIqbw3xRSker5vz7T1+d/9T7E2JNylsIiGNoLLm1fWwNq0FDjUz";
"x-amz-request-id" = 66F8735545490417;
}
**