async function requestEventsData(xhr, calendarUrl, eventsToUpdate, calDavHost) {
  const req = new this.dav.Request({
    method: 'REPORT',
    requestData: `
          <c:calendar-multiget xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
              <d:prop>
                  <d:getetag />
                  <c:calendar-data />
              </d:prop>
              ${eventsToUpdate
                .filter((eventToUpdate) => JSON.stringify(eventToUpdate.props) !== JSON.stringify({}))
                .map((eventToUpdate) => {
                  if (!eventToUpdate.href.endsWith('.ics')) {
                    return '';
                  }
                  return `<d:href>${encodeURIComponent(eventToUpdate.href).replace(/%2F/g, '/')}</d:href>`;
                })
                .join('\n')}
              <c:filter>
                  <c:comp-filter name="VCALENDAR">
                      <c:comp-filter name="VEVENT" />
                  </c:comp-filter>
              </c:filter>
          </c:calendar-multiget>`,
    transformRequest: (request) => request.setRequestHeader('Content-Type', 'application/xml;charset=utf-8'),
  });

  const eventsData = await xhr.send(req, calendarUrl);

  // Extract data from XML response
  const xmlEvents = new this.xmlDom.DOMParser().parseFromString(eventsData.request.responseText);
  const jsonEvents = getElementsByTagRegex(xmlEvents, /^[a-zA-Z]*:?response$/).map((xmlEvent) => {
    const event = this.ical.parseICS(
      getElementsByTagRegex(xmlEvent, /^[a-zA-Z]*:?calendar-data$/)[0].childNodes[0].data,
    );
    for (let j = 0; j < Object.keys(event).length; j += 1) {
      if (event[Object.keys(event)[j]].type === 'VEVENT') {
        return {
          href: getElementsByTagRegex(xmlEvent, /^[a-zA-Z]*:?href$/)[0].childNodes[0].data,
          ...event[Object.keys(event)[j]],
        };
      }
    }
    return null;
  });

  // Filter only event objects
  return jsonEvents.filter((jsonEvent) => {
    return jsonEvent !== null;
  });
}
@description Get change details from caldav server.
@param {object} xhr - Request with dav credentials.
@param {string} calendarUrl - Request url.
@param {object} eventsToUpdate - Event that needs updating.
@param {string} calDavHost - Server host.
@returns {Promise} Resolving with all detailed events.
@example
requestEventsData(xhr, calendarUrl, eventsToUpdate, CALDAV_HOST)