def send_text(self, txt, status=200):
        """
        Sends plaintext response to client. Automatically sets the content-type
        header to text/plain. If txt is not a string, it will be formatted as
        one.

        Parameters
        ----------
        txt : str
            The plaintext string to be sent back to the client
        status : int, optional
            The HTTP status code, defaults to 200 (OK)
        """
        self.headers.setdefault('content-type', 'text/plain')
        if not isinstance(txt, bytes):
            txt = str(txt).encode()
        self.message = txt
        self.status_code = status
        self.end()