Created
March 17, 2019 10:19
-
-
Save aribornstein/817982ab981f7a34a83b73855771f92b to your computer and use it in GitHub Desktop.
Fetch Azure Blob Container List JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch("https://{namespace}.blob.core.windows.net/{containerName}/?restype=container&comp=list") | |
.then(response => response.text()) | |
.then(str => new window.DOMParser().parseFromString(str, "text/xml")) | |
.then(xml => { | |
let blobList = Array.from(xml.querySelectorAll("Url")); //.getAttribute("Url"); | |
blobList.forEach(async blobUrl => { | |
console.log(blobUrl); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment