def METHOD_NAME(self, matches):
    """ Each match will trigger a POST to the specified endpoint(s). """
    for match in matches:
        match_js_esc = _escape_all_values(match)
        args = {**match_js_esc}
        if self.jinja_root_name:
            args[self.jinja_root_name] = match_js_esc
        try:
            field = 'payload'
            payload = match if self.post_all_values else {}
            payload_res = _render_json_template(self.post_payload, args)
            payload = {**payload, **payload_res}
            field = 'headers'
            header_res = _render_json_template(self.post_http_headers, args)
            headers = {
                "Content-Type": "application/json",
                "Accept": "application/json;charset=utf-8",
                **header_res
            }
        except TemplateSyntaxError as e:
            raise ValueError(f"HTTP Post 2: The value of 'http_post2_{field}' has an invalid Jinja2 syntax. "
                             f"Please check your template syntax: {e}")
        except JSONDecodeError as e:
            raise ValueError(f"HTTP Post 2: The rendered value for 'http_post2_{field}' contains invalid JSON. "
                             f"Please check your template syntax: {e}")
        except Exception as e:
            raise ValueError(f"HTTP Post 2: An unexpected error occurred with the 'http_post2_{field}' value. "
                             f"Please check your template syntax: {e}")
        for post_key, es_key in list(self.post_raw_fields.items()):
            payload[post_key] = lookup_es_key(match, es_key)
        if self.post_ca_certs:
            verify = self.post_ca_certs
        else:
            verify = not self.post_ignore_ssl_errors
        if self.post_ignore_ssl_errors:
            requests.packages.urllib3.disable_warnings()
        for key, value in headers.items():
            if type(value) in [type(None), list, dict]:
                raise ValueError(f"HTTP Post 2: Can't send a header value which is not a string! "
                                 f"Forbidden header {key}: {value}")
        proxies = {'https': self.post_proxy} if self.post_proxy else None
        for url in self.post_url:
            try:
                response = requests.post(url, data=json.dumps(payload, cls=DateTimeEncoder),
                                         headers=headers, proxies=proxies, timeout=self.timeout,
                                         verify=verify)
                response.raise_for_status()
            except RequestException as e:
                raise EAException("Error posting HTTP Post 2 alert: %s" % e)
        elastalert_logger.info("HTTP Post 2 alert sent.")