Open aparamon opened 5 years ago
import requests
with requests.session() as session:
url = 'https://register.fdsinstitut.com/ext/index.php'
headers = {} cookies = {} donnees = {}
reponse = session.post(url, headers=headers, cookies=cookies, data=donnees)
print(reponse.text)
Currently,
Client
creates a session per WebDAV request, e.g.: https://github.com/appetito/webdav-client-python-2/blob/a7da86be7c6a795287a2fd223666b3895def389a/webdav2/client.py#L159-L164 It is sub-optimal:requests.Session
with custom headers/transport adapters. It is proposed thatClient
can optionally be initialized with existingrequests.Session
instance.