Unity 不支持 CookieContainer 类,所以通过 HttpWebRequest.CookieContainer 方式设置cookies时只要 new CookieContainer 就会报非法字符的错,其实并不是字符非法,而是不支持这个类
ArgumentException: Illegal byte sequence encounted in the input.
Parameter name: string
解决办法:用HttpWebRequest.Headers.Add("Cookie", cookiesString); 方法直接赋值字符串。