зеркало из https://github.com/Azure/AzureGraph.git
Encode hash (#) in URL path (#33)
* encode hash in path * bump version and add NEWS
This commit is contained in:
Родитель
0075366b6f
Коммит
221771e346
|
@ -1,6 +1,6 @@
|
|||
Package: AzureGraph
|
||||
Title: Simple Interface to 'Microsoft Graph'
|
||||
Version: 1.3.2
|
||||
Version: 1.3.3
|
||||
Authors@R: c(
|
||||
person("Hong", "Ooi", , "hongooi73@gmail.com", role = c("aut", "cre")),
|
||||
person("Microsoft", role="cph")
|
||||
|
|
4
NEWS.md
4
NEWS.md
|
@ -1,3 +1,7 @@
|
|||
# AzureGraph 1.3.3
|
||||
|
||||
- Paths containing a hash (#) are encoded in `call_graph_endpoint()` and no longer fail with 404
|
||||
|
||||
# AzureGraph 1.3.2
|
||||
|
||||
- Minor backend fixes.
|
||||
|
|
|
@ -32,6 +32,7 @@ call_graph_endpoint <- function(token, operation, ..., options=list(),
|
|||
{
|
||||
url <- find_resource_host(token)
|
||||
url$path <- construct_path(api_version, operation)
|
||||
url$path <- encode_hash(url$path)
|
||||
url$query <- options
|
||||
|
||||
call_graph_url(token, url, ...)
|
||||
|
@ -138,6 +139,11 @@ construct_path <- function(...)
|
|||
sub("/$", "", file.path(..., fsep="/"))
|
||||
}
|
||||
|
||||
# paths containing hash need to be encoded
|
||||
encode_hash <- function(x)
|
||||
{
|
||||
gsub("#", "%23", x, fixed = TRUE)
|
||||
}
|
||||
|
||||
# display confirmation prompt, return TRUE/FALSE (no NA)
|
||||
get_confirmation <- function(msg, default=TRUE)
|
||||
|
|
Загрузка…
Ссылка в новой задаче