ember data - Deleting Records and getting (SyntaxError: Unexpected end of input) -


i getting above when deleting record.

syntaxerror: unexpected end of input 

here request:

remote address:127.0.0.1:8085 request url:http://localhost:8085/myproject/rest/bookingvehicles/100 request method:delete status code:200 ok 

here java method using:

i have tried this:

@requestmapping(value = "{id}",         method = requestmethod.delete,         produces = mediatype.application_json_value) @responsestatus(httpstatus.ok) public void delete(@min(1) @pathvariable("id") final long id) {     bookingvehicledao.delete(id); } 

and this:

@requestmapping(value = "{id}",         method = requestmethod.delete,         produces = mediatype.application_json_value) @responsestatus(httpstatus.accepted) public string delete(@min(1) @pathvariable("id") final long id) {     bookingvehicledao.delete(id);     return ""; } 

and this:

@requestmapping(value = "{id}",         method = requestmethod.delete) @responsestatus(httpstatus.accepted) public string delete(@min(1) @pathvariable("id") final long id) {     bookingvehicledao.delete(id);     return ""; } 

each time getting error. doing .then() on result never runs because according ember-data error has occurred. thinking maybe has httpstatus. correct http code delete?

on server side records correctly deleted definately response not liking.

found issue, need return @responsestatus(httpstatus.no_content)

so:

@requestmapping(value = "{id}",         method = requestmethod.delete) @responsestatus(httpstatus.no_content) public void delete(@min(1) @pathvariable("id") final long id) {     bookingvehicledao.delete(id); } 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -