(self, action, method="GET", params=None, data=None, headers=None, cookies='',\
                    timeout=default_timeout, urlencode='utf-8', is_json=True)
return html
默认以get方式请求，
            GET方式附加内容用add参数，POST方式提交内容用data参数。
            编码用urlencode参数，默认utf-8。
            默认cookies为空。
默认以get方式请求，
            GET方式附加内容用add参数，POST方式提交内容用data参数。
            编码用urlencode参数，默认utf-8。
            默认cookies为空。
默认以get方式请求， GET方式附加内容用add参数，POST方式提交内容用data参数。 编码用urlencode参数，默认utf - 8。 默认cookies为空。
def httpRequest(self, action, method="GET", params=None, data=None, headers=None, cookies='',\
                    timeout=default_timeout, urlencode='utf-8', is_json=True):
        """
            默认以get方式请求，
            GET方式附加内容用add参数，POST方式提交内容用data参数。
            编码用urlencode参数，默认utf-8。
            默认cookies为空。
        """
        if not headers:
            headers = self.headers

        if method.upper() == 'GET':
            if params:
                html = self.sessions.get(action, params=params, headers=headers, cookies=cookies, timeout=timeout)
            else:
                html = self.sessions.get(action, headers=headers, cookies=cookies, timeout=timeout)
            html.encoding = urlencode

        elif method.upper() == 'POST':
            if data:
                html = self.sessions.post(action, data=data, headers=headers, cookies=cookies, timeout=timeout)
            else:
                html = self.sessions.post(action, headers=headers, cookies=cookies, timeout=timeout)
            html.encoding = urlencode

        return html
def httpRequest ( self , action , method = "GET" , params = None , data = None , headers = None , cookies = '' , timeout = default_timeout , urlencode = 'utf-8' , is_json = True ) : if not headers : headers = self . headers if method . upper ( ) == 'GET' : if params : html = self . sessions . get ( action , params = params , headers = headers , cookies = cookies , timeout = timeout ) else : html = self . sessions . get ( action , headers = headers , cookies = cookies , timeout = timeout ) html . encoding = urlencode elif method . upper ( ) == 'POST' : if data : html = self . sessions . post ( action , data = data , headers = headers , cookies = cookies , timeout = timeout ) else : html = self . sessions . post ( action , headers = headers , cookies = cookies , timeout = timeout ) html . encoding = urlencode return html