Created
August 6, 2019 22:49
-
-
Save jamesasu/9ec1ebe41dfdfaa0419e2b5198551cac to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<script runat=server> | |
Platform.Load("core", "1.1.1"); | |
var accessToken = {{yourToken}}; | |
var url = 'https://www.exacttargetapis.com/asset/v1/content/assets/{{ContentID}}' | |
var payload = '{{yourPayload}}'; | |
var auth = 'Bearer ' + accessToken; | |
var req = new Script.Util.HttpRequest(url); | |
req.emptyContentHandling = 0; | |
req.retries = 2; | |
req.continueOnError = true; | |
req.contentType = "application/json" | |
req.setHeader("Authorization", auth); | |
req.method = "PUT"; /*** You can change the method here ***/ | |
req.postData = payload; | |
var resp = req.send(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment