2016-11-09 2 views
0

다음 Python 호출에서 C# Web API 측의 Python HTTPBasicAuth에서 User와 Pass를 얻는 방법은 무엇입니까? 가 일반 텍스트로 전송 않다면C# Web API에서 - 파이썬에서 User와 Pass를 얻는 방법 HTTPBasicAuth

from requests.auth import HTTPBasicAuth 
s = requests.Session() 

# Make the initial authentication request from a session object 
s.get('https://omg.wtf/user', auth=HTTPBasicAuth('user', 'pass')) 

# All subsequent requests from that session will include any cookies set in the initial response 
r = s.get('http://omg.wtf/911') 

답변