HTTPRequest.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:download-manager 作者: thispc 项目源码 文件源码
def __init__(self, cookies=None, options=None):
        self.c = pycurl.Curl()
        self.rep = StringIO()

        self.cj = cookies #cookiejar

        self.lastURL = None
        self.lastEffectiveURL = None
        self.abort = False
        self.code = 0 # last http code

        self.header = ""

        self.headers = [] #temporary request header

        self.initHandle()
        self.setInterface(options)

        self.c.setopt(pycurl.WRITEFUNCTION, self.write)
        self.c.setopt(pycurl.HEADERFUNCTION, self.writeHeader)

        self.log = getLogger("log")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号