3)In Spring if we are not expecting any content from server,then we have to use HTTP PUT method,In Spring restful web services we can use PUT method like below.
@RequestMapping(value="/{name}",method=RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void saveData(@PathVariable("name") String name){
xservice.saveValue(name);
}
@RequestMapping(value="/{name}",method=RequestMethod.PUT)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void saveData(@PathVariable("name") String name){
xservice.saveValue(name);
}
Comments