curl发送post请求出现:Request method 'post' not supported
来源:互联网 发布:网站迁移到阿里云 编辑:程序博客网 时间:2024/06/05 15:22
今天做一个测试,利用命令行下curl命令发送post请求,后台是springmvc,我的命令书写出了点差错。
curl -X post --data "lpsust=ZAgAAAAAAAGE9MTAwNTg2NTc0ODAmYj0xJmM9NCZkPTExNDA4JmU9RkM2ODgxODAxMDVGNjE4OEQzOUM5Nzk1NjY2MkJCRTgxJmg9MTQ4OTU0NDAyMTI5MCZpPTEyMDk2MDAmaj0wJmlsPWNuLq4bz7sOwBS1X4dKb-QmOA&pkgname=com.hgqn.unbeatablepigman.lenovo" http://10.103.94.96:8080/luckydraw/reserve/notify.json结果就报了错:
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleHttpRequestMethodNotSupported(210) | Request method 'post' not supported
出现这个错,提示很明显Request method 'post' not supported。springmvc收到了这样的请求,但是在做方法类型判断时不支持小写。
通过curl发请求,标准写法是 post,get,delete,put等需要大写,原来springmvc对方法类型大小写很敏感。
正确写法:
改正之后再次做操作就成功。
0 0
- curl发送post请求出现:Request method 'post' not supported
- request method 'post' not supported
- Request method 'POST' not supported
- Spring MVC-Request method 'POST' not supported:
- request method 'post' not supported问题解决
- springmvc解决 405 request method post not supported(Request method 'POST' not supported)
- Spring MVC出现POST 400 Bad Request &405 Request method 'GET' not supported
- 使用springmvc提交put请求时提示 Request method 'POST' not supported
- 在pring框架出现 405 request method post not supported 的解决方法
- 关于HTTP Status 500 - Request method 'POST' not supported分析
- HTTP Status 405 - Request method 'POST' not supported (Spring MVC)
- Spring MVC Request method 'POST' not supported错误
- SpringBoot 调用ajax POST 方法报Request method 'POST' not supported解决方法
- curl命令发送Post请求
- PHP CURL发送POST请求
- 用curl 发送 post 请求
- Spring MVC HTTP Status 405 – Request method ‘POST’ not supported
- spring MVC form表单提交用RequestMethod.POST报错 : Request method 'GET' not supported
- OpenGL的Draw函数
- 每天学到的点滴
- ARM平台移植libcurl curl-7.49.0
- 理解矩阵(二)
- 【linux】搭建fastdfs
- curl发送post请求出现:Request method 'post' not supported
- Maven 环境下使用 proguard 混淆 多模块 J2EE工程
- java数组
- eclipse无法安装spring插件,安装spring插件后windows-preferences没有spring选项,java开发所需工具类集合,eclipse+spring插件+tomcat,
- IcoMoon的用法(SVG转化为ICONFONT)
- APP启动时间抓取
- Android|图形图像之canvas
- 解决jquery 与其它库的冲突
- 欢迎使用CSDN-markdown编辑器