更新于 2024.05.06
建议使用axios
superagent 发送 Post 请求
- json 类型
superagent
.post("/api/pet")
.send({ name: "Manny", species: "cat" }) // sends a JSON post body
.set("X-API-Key", "foobar")
.set("accept", "json")
.end((err, res) => {
// Calling the end function will send the request
});
小于 1 分钟