on ‎2018 Jul 09 3:47 PM
I am creating simple method in a controller and calling from UI , it is a post method and giving error as 403. Sample UI part url : targeturl data : JSON.stringify(requestData), type : "POST", datatype : 'json', contentType:'application/json', cache : false
Sample method part @RequestMapping(value = "/method1", method = RequestMethod.POST, produces = "application/json") @ResponseBody public String method1(final DTO dto1) {}
Request clarification before answering.
Hi, Thanks for your prompt response. I have already tried by adding csrf token with request data as var requestData = { varA : test, CSRFToken : "Token generated" } ; data : JSON.stringify(requestData), Output as {varA: ["1", "2"], CSRFToken: "b84dd9d8-b740-91f0-a7ca-bba66f7b46f6"} with the same error as 403.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.