From 05e7e370876b92091538dbef61b3afe27a8d9e3a Mon Sep 17 00:00:00 2001 From: alanwe Date: Tue, 27 Sep 2016 08:48:22 +0100 Subject: [PATCH] Add Support for 201 return code. Deploy Template --- R/AzureTemplate.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/AzureTemplate.R b/R/AzureTemplate.R index 658d192..b243baa 100644 --- a/R/AzureTemplate.R +++ b/R/AzureTemplate.R @@ -57,7 +57,7 @@ AzureDeployTemplate <- function(AzureActiveContext,DeplName,TemplateURL,ParamURL r <- PUT(URL,add_headers(.headers = c("Host" = "management.azure.com" ,"Authorization" = AT, "Content-Type" = "application/json")),body=bodyI,verbosity) # print(paste(DeplName,"Submitted")) - if (status_code(r) != 200 && status_code(r) != 202 ) {stop(paste("Error: Return code",status_code(r) ))} + if (status_code(r) != 200 && status_code(r) != 201 && status_code(r) != 202 ) {stop(paste("Error: Return code",status_code(r) ))} rl <- content(r,"text",encoding="UTF-8") # print (rl) df <- fromJSON(rl)