def send_request(host, send_url, method='GET', port=80, params={}, timeout=30, headers={'Content-type': 'application/x-www-form-urlencoded', 'Accept': 'text/plain'}):
    '发起http请求. 执行结果返回响应字符串\n    \n    @param: The sample parameters format like following: \n        params = {\'token\': \'dF0zeqAPWs\'}\n        headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}\n        host = \'fir.im\'\n        port = 80\n        method = \'GET\'\n        send_url = \'/api/v2/app/version/541a7131f?token=dF0zeqBMXAP\'\n    '
    encoded_params = urllib.urlencode(params)
    conn = httplib.HTTPConnection(host, port=port, timeout=timeout)
    conn.request(method, send_url, encoded_params, headers)
    response = conn.getresponse()
    response_str = response.read()
    conn.close()
    return response_str
发起http请求. 执行结果返回响应字符串

@param: The sample parameters format like following: 
    params = {'token': 'dF0zeqAPWs'}
    headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
    host = 'fir.im'
    port = 80
    method = 'GET'
    send_url = '/api/v2/app/version/541a7131f?token=dF0zeqBMXAP'
def send_request(host, send_url, method='GET', port=80, params={}, timeout=30, headers={'Content-type': 'application/x-www-form-urlencoded', 'Accept': 'text/plain'}):
    '发起http请求. 执行结果返回响应字符串\n    \n    @param: The sample parameters format like following: \n        params = {\'token\': \'dF0zeqAPWs\'}\n        headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}\n        host = \'fir.im\'\n        port = 80\n        method = \'GET\'\n        send_url = \'/api/v2/app/version/541a7131f?token=dF0zeqBMXAP\'\n    '
    encoded_params = urllib.urlencode(params)
    conn = httplib.HTTPConnection(host, port=port, timeout=timeout)
    conn.request(method, send_url, encoded_params, headers)
    response = conn.getresponse()
    response_str = response.read()
    conn.close()
    return response_str