Created
April 28, 2022 03:56
-
-
Save camrobert/4a40e5dfaf2ea27bc8a7c9c8f754f6d9 to your computer and use it in GitHub Desktop.
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
<script runat="server"> | |
Platform.Load("Core","1"); | |
try{ | |
var url = 'https://hooks.slack.com/services/xxxxxxxx/yyyyyyyyyyyy/zzzzzzzzzzzzzzzz'; | |
var contentType = 'text/plain'; | |
var payload = '{"text":"Now this is SSJS!"}'; | |
var headerNames = []; | |
var headerValues = []; | |
var result = HTTP.Post(url, contentType, payload, headerNames, headerValues); | |
Write(result.StatusCode + '<br>'); | |
Write(result.Response); | |
} | |
catch(error) { | |
Write('Message: '+ error); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment