Отключение поддержки - PullRequest
       35

Отключение поддержки

0 голосов
/ 20 декабря 2018

В старых версиях Requests была возможность отключить поддержку активности.Примерно так:

s = requests.session()
s.config['keep_alive'] = False

Я также нахожу в другом вопросе, что я могу использовать заголовок Connection: закрыть

HTTP/1.1 defines the "close" connection option for the sender to signal 
that the connection will be closed after completion of the response. 
For example,
   Connection: close
in either the request or the response header fields indicates that the 
connection SHOULD NOT be considered `persistent' (section 8.1) after the 
current request/response is complete.
HTTP/1.1 applications that do not support persistent connections MUST 
include the "close" connection option in every message. 

Если я правильно понимаю, это не значит, что соединение будетзакрыто.Только информация о том, что его не следует считать постоянным.

Как это сделать в последних версиях?

...