class TencentCloud::Common::ApiRequset

def send_request(request, keep_alive = false)

def send_request(request, keep_alive = false)
  uri = URI("#{request.scheme}://#{request.host}#{request.uri}")
  @conn.keep_alive_timeout = 20 if keep_alive
  @conn.start do |http|
    case request.method
    when 'GET'
      uri.query = request.data
      req = Net::HTTP::Get.new uri
    when 'POST'
      req = Net::HTTP::Post.new uri
      req.body = request.data
    else
      raise TencentCloudSDKException.new('ClientParamsError', 'Method only support (GET, POST)')
    end
    request.header.each do |k, v|
      req[k] = v
    end
    resp = http.request req
    BaseResponse.new(resp.code, resp.each_header.to_h, resp.read_body)
  end
end