accept 204 code for put and 404 for delete