http - Postman 400 Web Api 错误请求

标签 http postman asp.net-core-webapi

我构建/运行了一个非常基本的 webApi(几乎是模板应用程序,仅此而已),以便遵循培训视频。 GET 和 DELETE 调用工作正常,PUT 和 POST 给出 400 错误。诚然,这一切都很新,所以我正在寻找一些关于如何排除故障的基本方向。相关屏幕截图如下,我很乐意根据要求提供其他屏幕截图。提前致谢。

enter image description here

enter image description here

enter image description here

enter image description here

最佳答案

您正在尝试发出 POST 请求,该请求的正文中需要字符串值。

进入 Postman 请求的正文部分,选择 form-data,然后添加 value 作为参数名称,并将 This is test string 添加为参数值

enter image description here

关于http - Postman 400 Web Api 错误请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54410346/

相关文章:

http - 通过 HTTP 协议(protocol)抓取 VLC 帧

c# - 解析值行 1,位置 1 时遇到意外字符

java - Servlet 请求阻塞

php - AngularJS $http.post 响应确定错误

JSON POST 中的 C# HttpWebRequest "Request Header"

c# - 带有 DTD 解析错误的 .NET Core Web API XML

c# - 使用基于属性的路由时 ASP.NET Core 中的路由冲突

typescript - 如何使用 bcrypt 模块使用 NestJS 在 MongoDB 中保存加密密码

soap - NetSuite- postman -休息- "Incorrect data center requested!"

使用 REST API 的 Azure 调用设备模块方法