Updating sample xhr,get,put