我不知道为什么,但如果函数没有得到错误,它是完美的工作,但当它得到错误,捕捉总是显示。res.end is not a functionimport { NextApiResponse } from "next";
const handler = async (res: NextApiResponse):
我无法通过axios设置标题,例如,将内容类型设置为application/json。axios没有抛出异常,但请求在浏览器中获得"415不支持的媒体类型“响应。有我犯错的线索吗?以下是密码-import axios from 'axios';
axios.defaults.headers.common['Content-Type'