HTTP DELETE 请求返回 (405) 方法不允许错误。为什么?
我试图通过 csharp、ASP.NET 发送 DELETE 请求,并返回 (405) 错误。下面是我正在使用的代码:
请求= System.Net.HttpWebRequest.Create(myTargetURL); 请求方法=“删除”;响应= (System.Net.HttpWebResponse)request.GetResponse();
任何人都可以阐明这一点吗?从代码的角度来看,这是我没有做的事情吗?
I'm attempting to send a DELETE request through csharp, ASP.NET and its returnin a (405) Error. Below is the code that I'm using:
request =
System.Net.HttpWebRequest.Create(myTargetURL);
request.Method = "DELETE"; response =
(System.Net.HttpWebResponse)request.GetResponse();
Anybody can shed some light on this? is it something I'm not doing from a code point of view?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您的一切工作正常,但听起来您向其发送 DELETE 方法请求的服务器不允许这样做。
Looks like everything is working properly on your end and sounds like the server you are sending your DELETE method request to does not allow it.