?? httpauth.py
字號:
import itertoolsfrom dl_daemon import commandimport eventlooprequestIdGenerator = itertools.count()waitingHTTPAuthCallbacks = {}def handleHTTPAuthResponse(id, authHeader): callback = waitingHTTPAuthCallbacks.pop(id) callback(authHeader)def findHTTPAuth(callback, host, path): id = requestIdGenerator.next() waitingHTTPAuthCallbacks[id] = callback from dl_daemon import daemon c = command.FindHTTPAuthCommand(daemon.lastDaemon, id, host, path) c.send()def askForHTTPAuth(callback, host, path, authScheme): id = requestIdGenerator.next() waitingHTTPAuthCallbacks[id] = callback from dl_daemon import daemon c = command.AskForHTTPAuthCommand(daemon.lastDaemon, id, host, path, authScheme) c.send()
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -