ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    Axios 下载 Blob

    Dec 15, 20218 min read

    Axios 下载 Blob

    getBlob(url, param, type) {
            return service(
                {
                    method: 'get',
                    url,
                    headers: {
                        'Content-Type': type === 'form' ? 'application/x-www-form-urlencoded' : 'application/json'
                    },
                    params: param,
                    responseType: 'blob',
                }
            )
    },
    

    设置响应体类型 responseType: 'blob',

    相关文章

    SpringBoot 的@Value注解设置默认值

    在Spring Boot中,使用@Value注解时,可以通过“:”为未在配置文件中指定的属性设置默认值,以避免启动时的异常。

    flutter doctor --android-licenses 报错

    执行`flutter doctor --android-licenses`时遇到Java版本不兼容错误,需要升级Java版本至Java SE 11以匹配class file version 55.0。

    解决maven打包编译出现File encoding has not been set问题

    Maven打包编译时因未设置文件编码而输出警告,通过在pom.xml中配置`<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>`解决。

    Flutter 用户尝试将设备转到横屏模式,应用界面将不会旋转以适应横屏

    在Flutter中,通过在`AndroidManifest.xml`和`AppDelegate.swift`文件中设置`screenOrientation`和`supportedInterfaceOrientations`为`portrait`,可以禁止应用界面旋转至横屏模式。

    Flutter AlertDialog 控制显示和隐藏

    这段代码展示了如何在Flutter应用中使用`AlertDialog`来显示一个带有标题、内容和“OK”按钮的对话框,并通过点击按钮来控制其显示和隐藏。