modify the way to get cookie for api changes

modify the way to get cookie for api changes
Merge branch 'dev'