def send(self, data_to_send):
        """ Immediately sends the data passed in to :func:`service_endpoint_uri`. If the service request fails, the
        passed in items are pushed back to the :func:`queue`.

        Args:
            data_to_send (Array): an array of :class:`contracts.Envelope` objects to send to the service.
        """
        request_payload = json.dumps([ a.write() for a in data_to_send ])

        request = HTTPClient.Request(self._service_endpoint_uri, bytearray(request_payload, 'utf-8'), { 'Accept': 'application/json', 'Content-Type' : 'application/json; charset=utf-8' })
        try:
            response = HTTPClient.urlopen(request)
            status_code = response.getcode()
            if 200 <= status_code < 300:
                return
        except __HOLE__ as e:
            if e.getcode() == 400:
                return
        except Exception as e:
            pass

        # Add our unsent data back on to the queue
        for data in data_to_send:
            self._queue.put(data)
dataset/ETHPy150Open Microsoft/ApplicationInsights-Python/applicationinsights/channel/SenderBase.py/SenderBase.send