def send_headers(self):
        """
        Sends the headers to the client
        """
        self.events.sync_emit('headers')
        self._set_default_headers()
        header_str = self.status_line + self.EOL + str(self.headers)
        self.stream.write(header_str.encode())
        self.events.sync_emit('after_headers')
def send_headers ( self ) : self . events . sync_emit ( 'headers' ) self . _set_default_headers ( ) header_str = self . status_line + self . EOL + str ( self . headers ) self . stream . write ( header_str . encode ( ) ) self . events . sync_emit ( 'after_headers' )
Sends the headers to the client