Skip to content

Commit

Permalink
fix parse query string
Browse files Browse the repository at this point in the history
  • Loading branch information
M3nin0 committed Jan 31, 2025
1 parent 208033f commit a08dbd9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Suggests:
gdalcubes (>= 0.7.0),
geojsonsf,
ggplot2,
httr2,
httr2 (>= 1.1.0),
jsonlite,
kohonen (>= 3.0.11),
leaflet (>= 2.2.0),
Expand Down
2 changes: 1 addition & 1 deletion R/api_cube.R
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ NULL
# check that token is valid
.check_that(.has(res_content))
# parse token
token_parsed <- .url_parse(paste0("?", res_content[["token"]]))
token_parsed <- .url_parse_query(res_content[["token"]])
file_info[["path"]] <- purrr::map_chr(seq_along(fi_paths), function(i) {
path <- fi_paths[[i]]
if (are_local_paths[[i]]) {
Expand Down
13 changes: 13 additions & 0 deletions R/api_request_httr2.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,19 @@
httr2::url_parse(url)
}

#' @title Parse URL
#' @name .url_parse_query
#' @keywords internal
#' @noRd
#' @author Felipe Carvalho, \email{felipe.carvalho@@inpe.br}
#'
#' @param url A character with URL query string.
#'
#' @return An character vector with parsed URL query string.
.url_parse_query <- function(url) {
httr2::url_parse(url)
}

#' @title Build an URL
#' @name .url_build
#' @keywords internal
Expand Down
12 changes: 7 additions & 5 deletions man/sits_classify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a08dbd9

Please sign in to comment.