Unfortunately, not quite that simple. The call Response.ResponseBuilder#entity() helpfully resets the response code from 204 to 200, even if the entity is an empty string. So we need to have a second code path for executing the rest response (i.e. the delete) if we expect the response to really read 204.
Update the RestServiceFilesIT to read through and compare header and response codes to verify the delete is returning correct response.
Fix the RestResponseBuilder to correctly handle the NO_CONTENT case, and handle jsonp settings for delete.
Unfortunately, not quite that simple. The call Response. ResponseBuilder #entity( ) helpfully resets the response code from 204 to 200, even if the entity is an empty string. So we need to have a second code path for executing the rest response (i.e. the delete) if we expect the response to really read 204.
Update the RestServiceFilesIT to read through and compare header and response codes to verify the delete is returning correct response.
Fix the RestResponseBuilder to correctly handle the NO_CONTENT case, and handle jsonp settings for delete.