fetch可选参数有一个 responseType,默认为json

err use

const handleLogin = () => {
  fetch("http://localhost:5000/login", {
    method: "POST",
    body: JSON.stringify(user),
  });
};

right

import { Body } from '@tauri-apps/api/http';
body: Body.form(formData)|Body.json({a: 1})
Body类下面静态方法有:
static form(data: Record<string, Part> | FormData): Body;
static json(data: Record<any, any>): Body;
static text(value: string): Body;
static bytes(bytes: Iterable<number> | ArrayLike<number> | ArrayBuffer): Body;