This commit is contained in:
Hong Ooi 2019-03-17 06:55:39 +11:00
Родитель c4b969bcf7
Коммит f9d87e4887
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -12,7 +12,7 @@
#' @param ... Other arguments passed to lower-level code, ultimately to the appropriate functions in httr.
#'
#' @details
#' These functions form the low-level interface between R and Azure. `call_azure_rm` is for calling the Resource Manager API, and `call_azure_graph` is for calling the Azure Active Directory Graph API. They build a URL from their arguments and pass it to `call_azure_url`. Authentication is handled automatically.
#' These functions form the low-level interface between R and Azure. `call_azure_rm` is builds a URL from its arguments and passes it to `call_azure_url`. Authentication is handled automatically.
#'
#' @return
#' If `http_status_handler` is one of `"stop"`, `"warn"` or `"message"`, the status code of the response is checked. If an error is not thrown, the parsed content of the response is returned with the status code attached as the "status" attribute.
@ -91,7 +91,7 @@ process_response <- function(response, handler)
}
# provide complete error messages from Resource Manager/AAD Graph/etc
# provide complete error messages from Resource Manager
error_message <- function(cont)
{
# kiboze through possible message locations
@ -103,7 +103,7 @@ error_message <- function(cont)
cont$message
else if(is.list(cont$error) && is.character(cont$error$message))
cont$error$message
else if(is.list(cont$odata.error)) # Graph OData
else if(is.list(cont$odata.error)) # OData
cont$odata.error$message$value
}
else ""

Просмотреть файл

@ -42,7 +42,7 @@ If \code{http_status_handler} is \code{"pass"}, the entire response is returned
Call the Azure Resource Manager REST API
}
\details{
These functions form the low-level interface between R and Azure. \code{call_azure_rm} is for calling the Resource Manager API, and \code{call_azure_graph} is for calling the Azure Active Directory Graph API. They build a URL from their arguments and pass it to \code{call_azure_url}. Authentication is handled automatically.
These functions form the low-level interface between R and Azure. \code{call_azure_rm} is builds a URL from its arguments and passes it to \code{call_azure_url}. Authentication is handled automatically.
}
\seealso{
\link[httr:GET]{httr::GET}, \link[httr:PUT]{httr::PUT}, \link[httr:POST]{httr::POST}, \link[httr:DELETE]{httr::DELETE}, \link[httr:stop_for_status]{httr::stop_for_status}, \link[httr:content]{httr::content}