Http Post with request content type form not working in Spring MVC 3

后端 未结 7 1605
旧时难觅i
旧时难觅i 2020-12-02 11:13

code snippet:

@RequestMapping(method = RequestMethod.POST)//,  headers = \"content-type=application/x-www-form-urlencoded\")
public ModelAndView create(@Req         


        
7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 11:49

    I was having HTTP response code of 415

    My problems were resolved when I added Content Type to request header

    e.g

    "Content-Type: application/json"

提交回复
热议问题