Last active
August 17, 2017 10:57
-
-
Save mclasson/7f39ed5ce3f1b7dfd57eec53156985c5 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
library("httr") | |
httr::set_config(config(http_version = 2)) # set the HTTP version to 1.1 (none, 1.0, 1.1, 2) | |
sendMail <- function(e){ | |
body <- list(secret = 'sfsdf£$4500dfdd__$$', body=e["message"]) # create a list that will be serialized to JSON | |
result <- POST(url = "https://prod-10.westeurope.logic.azure.com/workflows/8934jadajada999" | |
, body = body , encode = "json", handle = NULL) | |
} | |
myProcess <- function(){ | |
stop("error") | |
} | |
tryCatch(myProcess(), error = sendMail) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment