I guess you want to do "res.code == 200" (compare vs assign)