PostMan

新建一个项目,需要用Poatman测试用

一直就是Debug不到,仔细看,有以下两点

    [Route("api/[controller]/[action]")]
    [ApiController]
    public class JDOrderController : ControllerBase
    {
        [HttpPost]
        public async Task<IActionResult> OrderGet(string method)
        {
            IActionResult result = null;           

            return result;
        }
    }

PostMan中:1:这两个规则要保持一致的。

http://localhost:61870/api/JDOrder/OrderGet?method=3

2: 就是要去看看项目属性的----》调试标签下的Port号是不是和请求的是一样的

原文地址:https://www.cnblogs.com/ZkbFighting/p/13824675.html