(self, request)
return json.dumps({msg.to: msg.custom_headers})
Responds with a 200 and returns the headers recieved when the
        message with the given `to` address in the query, was created.

        This API endpoint is not supported by Mailgun and is present for testing
        purposes.
Responds with a 200 and returns the headers recieved when the
        message with the given `to` address in the query, was created.
Responds with a 200 and returns the headers recieved when the message with the given to address in the query was created .
def get_message_headers(self, request):
        """
        Responds with a 200 and returns the headers recieved when the
        message with the given `to` address in the query, was created.

        This API endpoint is not supported by Mailgun and is present for testing
        purposes.
        """
        request.setResponseCode(200)
        to_addr = request.args.get(b"to")[0].decode("utf-8")
        msg = self.core.message_store.filter_message_by_to_address(to_addr)
        if msg is None:
            request.setResponseCode(404)
            return json.dumps({})
        return json.dumps({msg.to: msg.custom_headers})
def get_message_headers ( self , request ) : request . setResponseCode ( 200 ) to_addr = request . args . get ( b"to" ) [ 0 ] . decode ( "utf-8" ) msg = self . core . message_store . filter_message_by_to_address ( to_addr ) if msg is None : request . setResponseCode ( 404 ) return json . dumps ( { } ) return json . dumps ( { msg . to : msg . custom_headers } )