Refactored and removed unnecessary codes.
Added response handler for REST Methods "DELETE" and "PUT"