Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created February 28, 2020 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/53eb4e2a2c3904e8797ca65987c27bab to your computer and use it in GitHub Desktop.
Save zuzannamj/53eb4e2a2c3904e8797ca65987c27bab to your computer and use it in GitHub Desktop.
fetch("https://pub.s10.exacttarget.com/xxxxxxx", { //provide URL of the processing page
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
base64enc: base64enc,
fileName: fileName,
assetName: assetName
})
})
.then(function(res) {
window.alert("Success!");
})
.catch(function(err) {
window.alert("Error!");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment