文章 2022-02-17 来自:开发者社区

3.C#WebAPI设置路由和参数2

1.上面已经教大家如何修改全局路由了,那么修改完后我们在post请求的要这样使用,其中model模型我就默认你应该已经建好了,没有创建的话请看上一部分 Post方法的参数,如果提交的请求体需要是phoneNum=123&password=123这样的格式。如果用string AddNew(string phoneNum, string password)这种普通参数会有很多的坑(参考《C....

文章 2022-02-17 来自:开发者社区

2.C#WebAPI设置路由和参数1

1.当我们创建WebApi的时候我们的项目下的Contorls文件夹下的ValuesController文件下会出现这么几个方法: // GET http://程序ip:程序端口/api/values public IEnumerable<string> Get() { return new string[] { "valu...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"云效DevOps解决方案:极速构建自动化CI/CD,降本增效稳交付","productDescription":"在快速变化的市场中,软件的快速迭代和稳定交付成为企业竞争的关键。本方案介绍如何使用阿里云的产品快速构建持续集成与部署流程。通过自动化构建、测试和部署流程,提高交付速度和质量,使开发团队更好地响应市场变化和用户需求,推动业务持续增长。","productContentLink":"https://www.aliyun.com/solution/tech-solution/swiftly-building-an-effective-ci-cd-pipeline","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/swiftly-building-an-effective-ci-cd-pipeline"},"productButton2":{"productButtonText":"方案部署","productButtonLink":"https://help.aliyun.com/document_detail/2861142.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"云架构必修课:云上高可用架构","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/hablog","productPromotionInfoSecondText":"灵活调度,高效编排,容器化管理云上应用","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/ack-services"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等