本文介绍了为什么在WEBAPI中使用HTTPPOST时可以使用HTTPPUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 据说HTTPPUT请求更新特定URI的对象,但是我们可以通过HTTPPOST请求(WEBAPI .Net)实现何时使用HTTPPOST和HTTPPUT。 我尝试过: 我在APIController继承的类中创建了HTTPPOST和HTTPPUT方法。并使用相同的方法更新 Httppost Method.I不知道为什么我们需要HTTPPUT当HTTPPOST存在时,或者只是提到我们已经更新了已经存在的东西。It is said that HTTPPUT Request updates the Object at Specific URI, but same thing we can achieve by HTTPPOST Request( WEBAPI .Net ) when to use HTTPPOST and When HTTPPUT.What I have tried:I created both HTTPPOST and HTTPPUT method in my APIController inherited class .And update with the same Httppost Method.I am not getting why we need HTTPPUT when HTTPPOST is there or it is just to mention that we are updatng something that already exist.推荐答案 这篇关于为什么在WEBAPI中使用HTTPPOST时可以使用HTTPPUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-13 18:00