Skip to content

Commit

Permalink
Merge pull request #731 from ldecicco-USGS/more_verbose
Browse files Browse the repository at this point in the history
add more information for all queries to see what we're trying to get …
  • Loading branch information
ldecicco-USGS authored Oct 8, 2024
2 parents fbc9a57 + 22441e3 commit adfb21e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/getWebServiceData.R
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ getQuerySummary <- function(url) {
retryGetOrPost <- function(obs_url, ...) {
resp <- NULL
if (nchar(obs_url) < 2048 || grepl(pattern = "ngwmn", x = obs_url)) {
message("GET: ", obs_url)
resp <- httr::RETRY("GET", obs_url, ..., httr::user_agent(default_ua()))
} else {
split <- strsplit(obs_url, "?", fixed = TRUE)
obs_url <- split[[1]][1]
query <- split[[1]][2]

message("POST: ", obs_url)
resp <- httr::RETRY("POST", obs_url, ...,
body = query,
httr::content_type("application/x-www-form-urlencoded"),
Expand Down

0 comments on commit adfb21e

Please sign in to comment.