public NicoLiveCommentSender(NiconicoLoginSession niconicoSession)
        {
            var handler = new HttpClientHandler();

            handler.CookieContainer.Add(niconicoSession.Cookie);
            this.httpClient = new HttpClient(handler);
        }
Beispiel #2
0
        public NicoLiveCommentSender(NiconicoLoginSession niconicoSession)
        {
            var handler = new HttpClientHandler();

            handler.CookieContainer.Add(niconicoSession.Cookie);
            this.httpClient = new HttpClient(handler);
            var assembly = Assembly.GetExecutingAssembly().GetName();
            var ua       = assembly.Name + "/" + assembly.Version.ToString(3);

            httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", ua);
        }