def finish
      raise IOError, 'HTTP session not yet started' unless started?
      do_finish
    end
Finishes the HTTP session and closes the TCP connection.
Raises IOError if the session has not been started.