diff --git a/NAMESPACE b/NAMESPACE index 40ab62f..64bc2a7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -86,7 +86,7 @@ importFrom(grid,rasterGrob) importFrom(grid,seekViewport) importFrom(grid,upViewport) importFrom(grid,viewport) -importFrom(httr,GET) +importFrom(httr,RETRY) importFrom(httr,http_status) importFrom(httr,stop_for_status) importFrom(httr,warn_for_status) diff --git a/R/geocode.R b/R/geocode.R index a260dbb..8373cd5 100644 --- a/R/geocode.R +++ b/R/geocode.R @@ -201,7 +201,7 @@ geocode <- function ( if (showing_key()) message("Source : ", url) else message("Source : ", scrub_key(url)) # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses if (response$status_code != 200L) { diff --git a/R/get_googlemap.R b/R/get_googlemap.R index af281d4..0bb648b 100644 --- a/R/get_googlemap.R +++ b/R/get_googlemap.R @@ -366,7 +366,7 @@ get_googlemap <- function( if (showing_key()) message("Source : ", url) else message("Source : ", scrub_key(url)) # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses if (response$status_code != 200L) { diff --git a/R/get_stamenmap.R b/R/get_stamenmap.R index ae23c40..9ab4811 100644 --- a/R/get_stamenmap.R +++ b/R/get_stamenmap.R @@ -375,7 +375,7 @@ get_stamenmap_tile <- function(maptype, zoom, x, y, color, force = FALSE, messag # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses diff --git a/R/ggmap-package.R b/R/ggmap-package.R index 069c406..0c48f59 100644 --- a/R/ggmap-package.R +++ b/R/ggmap-package.R @@ -17,7 +17,7 @@ #' @importFrom dplyr bind_cols filter bind_rows mutate group_by ungroup select #' right_join #' @importFrom glue glue -#' @importFrom httr GET http_status warn_for_status stop_for_status +#' @importFrom httr RETRY http_status warn_for_status stop_for_status #' @importFrom tibble tibble as_tibble #' @importFrom stringr str_to_title str_c str_detect str_c str_replace_all #' str_sub str_trim str_pad str_split str_trunc str_detect str_replace diff --git a/R/mapdist.R b/R/mapdist.R index 49b093d..6cf44d7 100644 --- a/R/mapdist.R +++ b/R/mapdist.R @@ -201,7 +201,7 @@ mapdist <- function ( if (showing_key()) message("Source : ", url) else message("Source : ", scrub_key(url)) # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses if (response$status_code != 200L) { diff --git a/R/revgeocode.R b/R/revgeocode.R index 038bf55..ce78aa2 100644 --- a/R/revgeocode.R +++ b/R/revgeocode.R @@ -103,7 +103,7 @@ revgeocode <- function ( if (showing_key()) message("Source : ", url) else message("Source : ", scrub_key(url)) # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses if (response$status_code != 200L) { diff --git a/R/route.R b/R/route.R index 32bb313..5e8d8e1 100644 --- a/R/route.R +++ b/R/route.R @@ -163,7 +163,7 @@ route <- function ( # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses diff --git a/R/trek.R b/R/trek.R index 327b0b9..9be1094 100644 --- a/R/trek.R +++ b/R/trek.R @@ -172,7 +172,7 @@ trek <- function ( # query server - response <- httr::GET(url) + response <- httr::RETRY(verb = "GET", url = url) # deal with bad responses