def _request(self, buf, properties, date=None):
        """Send a request to the CoreNLP server.

        :param (str | unicode) text: raw text for the CoreNLPServer to parse
        :param (dict) properties: properties that the server expects
        :param (str) date: reference date of document, used by server to set docDate - expects YYYY-MM-DD
        :return: request result
        """
        self.ensure_alive()

        try:
            input_format = properties.get("inputFormat", "text")
            if input_format == "text":
                ctype = "text/plain; charset=utf-8"
            elif input_format == "serialized":
                ctype = "application/x-protobuf"
            else:
                raise ValueError("Unrecognized inputFormat " + input_format)

            if date:
                params = {'properties': str(properties),'date': str(date)}
            else:
                params = {'properties': str(properties)}

            r = requests.post(self.endpoint,
                              params=params,
                              data=buf, headers={'content-type': ctype},
                              timeout=(self.timeout*2)/1000)
            r.raise_for_status()
            return r
        except requests.HTTPError as e:
            if r.text == "CoreNLP request timed out. Your document may be too long.":
                raise TimeoutException(r.text)
            else:
                raise AnnotationException(r.text)
Send a request to the CoreNLP server.

        :param (str | unicode) text: raw text for the CoreNLPServer to parse
        :param (dict) properties: properties that the server expects
        :param (str) date: reference date of document, used by server to set docDate - expects YYYY-MM-DD
        :return: request result