# File lib/em-http/client.rb, line 205
    def connection_completed              
      # if connecting to proxy, then first negotiate the connection
      # to intermediate server and wait for 200 response 
      if @options[:proxy] and @state == :response_header 
        @state = :response_proxy
        send_request_header
        
        # if connecting via proxy, then state will be :proxy_connected,
        # indicating successful tunnel. from here, initiate normal http
        # exchange
      else
        @state = :response_header
                      
        ssl = @options[:tls] || @options[:ssl] || {}
        start_tls(ssl) if @uri.scheme == "https" or @uri.port == 443
        send_request_header
        send_request_body
      end
    end