Last active
February 24, 2021 01:19
-
-
Save robertz/9b263b99b1c3c1d13d77b2ca2596fe2b to your computer and use it in GitHub Desktop.
ChronService.cfc
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
component{ | |
function log (required struct criteria) { | |
cfhttp(url = "https://api.kisdigital.com/chron/log", method = "POST", charset = "utf-8"){ | |
cfhttpparam(type = "header", name = "Content-Type", value = "application/json"); | |
cfhttpparam(type = "body", value = serializeJSON({ | |
"appid": "e92c801d-659a-4548-8a16-b79f6b37cf2d", | |
"type": criteria.keyExists("type") ? criteria.type : "information", | |
"log": criteria.keyExists("log") ? criteria.log : "default", | |
"message": criteria.keyExists("message") ? criteria.message : "No message." | |
})); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment