(self, request)
return json.dumps(self.core.message_store.list_messages(filter_by_to))
Responds with a 200 and list of of messages POSTed
        through the ``/messages`` endpoint.
Responds with a 200 and list of of messages POSTed
        through the ``/messages`` endpoint.
Responds with a 200 and list of of messages POSTed through the / messages endpoint .
def get_messages(self, request):
        """
        Responds with a 200 and list of of messages POSTed
        through the ``/messages`` endpoint.
        """
        tofield = request.args.get(b"to")
        filter_by_to = ([bytesarg.decode("utf-8") for bytesarg in tofield]
                        if tofield else None)
        request.setResponseCode(200)
        return json.dumps(self.core.message_store.list_messages(filter_by_to))
def get_messages ( self , request ) : tofield = request . args . get ( b"to" ) filter_by_to = ( [ bytesarg . decode ( "utf-8" ) for bytesarg in tofield ] if tofield else None ) request . setResponseCode ( 200 ) return json . dumps ( self . core . message_store . list_messages ( filter_by_to ) )