added patch request method, added response code to success callback