Re[3]: WPF + WebClient + async = непонятная кривота
От: _Raz_  
Дата: 08.11.15 23:44
Оценка:
Здравствуйте, Sinix, Вы писали:

S> решение стандартное находится


Там тоже не все гладко: HttpClient Lifecycle

The HttpClient object is intended to live for as long as your application needs to make HTTP requests. Having an object exist across multiple requests enables a place for setting DefaultRequestHeaders and prevents you from having to respecify things like CredentialCache and CookieContainer on every request, as was necessary with HttpWebRequest.


upd:
Henrik F. Nielsen (one of HttpClient's principal Architects): (via)

Everytime you create a new HttpClient you start a new session meaning that new TCP connections will have to get created etc.

In genral I would recommend reusing HttpClient instances as much as possible.

... << RSDN@Home (RF) 1.2.0 alpha 5 rev. 78>>
Отредактировано 09.11.2015 2:00 _Raz_ . Предыдущая версия .
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.