How to send data to spring boot method using FETCH API
I am exploring fetch api and want to send some for date to a spring boot method, but it is throwing 400 error JS code let fetchConfig = { method : params.method || 'GET', body : params.body }; return fetch(_url,fetchConfig).then(function (response) { if (!response.ok) { throw Error(response.statusText); } else { return response.json(); } }).then(function (data) { return data; }).catch(function (error) { return error; }) Spring boot method @RequestMapping(value = "/validate",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ValidateUserModel validateU
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.