fetchPrincipalUrl
fetchPrincipalUrl
Section titled “fetchPrincipalUrl”fetch resource principal collection url
const url = await fetchPrincipalUrl({ account: { serverUrl: 'https://caldav.icloud.com/', rootUrl: 'https://caldav.icloud.com/', accountType: 'caldav', }, headers: { authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”accountrequired, account withrootUrlandaccountTypeheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch functionfetchcustom fetch implementation
Return Value
Section titled “Return Value”principal collection url
Behavior
Section titled “Behavior”send current-user-principal PROPFIND request and extract principal collection url from xml response