2 # -*- coding: utf-8 -*-
5 ###################################################################################
6 from http
.client
import HTTPConnection
, HTTPSConnection
9 ###################################################################################
11 def __init__(self
, Parent
):
14 if data
["scheme"] == "https":
15 conn
= HTTPSConnection(data
["netloc"], timeout
=self
.Parent
.Configs
.timeout
)
17 conn
= HTTPConnection(data
["netloc"], timeout
=self
.Parent
.Configs
.timeout
)
19 conn
.request("GET", data
["path"], "", data
["headers"])
23 response
= conn
.getresponse()
24 output
= {"status":response
.status
, "reason":response
.reason
, "data":response
.read(), "headers":response
.getheaders()}