uniapp发送Form Data格式请求

设置header的Content-Type为 application/x-www-form-urlencoded 即可

uni.request({
    url: '', // 接口url
    data: {
       input: '写一篇一千字的作文'
    }, // 入参
    method: 'POST', // 参数类型
    header: {
      "Content-Type": "application/x-www-form-urlencoded"
    }, // 请求头
    success: (res) => {
      console.log(res, 'hhhhhhhhhhhhh')
    },
    complete: () => {},
    fail: (res) => {}
  })

这世界很喧嚣,做你自己就好

相关推荐

  1. axios get 请求发送 FormData 数据

    2024-07-14 06:36:01       23 阅读
  2. uniapp如何发送websocket请求

    2024-07-14 06:36:01       20 阅读
  3. 使用axios发送请求格式是什么?示例代码

    2024-07-14 06:36:01       28 阅读
  4. RestTemplate发送https请求

    2024-07-14 06:36:01       51 阅读
  5. electron发送post请求

    2024-07-14 06:36:01       40 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-14 06:36:01       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-14 06:36:01       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-14 06:36:01       58 阅读
  4. Python语言-面向对象

    2024-07-14 06:36:01       69 阅读

热门阅读

  1. k8s中kubesphere开启devops总是报错解决

    2024-07-14 06:36:01       24 阅读
  2. 酒店房间登记与计费管理系统(c++)

    2024-07-14 06:36:01       20 阅读
  3. golang监控公网IP变化自动同步dns解析

    2024-07-14 06:36:01       28 阅读
  4. Unity脚步.txt

    2024-07-14 06:36:01       25 阅读
  5. React Native Android 应用开发、调试与发布深度指南

    2024-07-14 06:36:01       28 阅读
  6. 方差是什么?

    2024-07-14 06:36:01       20 阅读
  7. 【jvm】字符串常量池问题

    2024-07-14 06:36:01       25 阅读
  8. VECTOR,ARRAYLIST, LINKEDLIST的区别是什么?

    2024-07-14 06:36:01       27 阅读