Skip to content

Commit

Permalink
Fixed another bug in try_query
Browse files Browse the repository at this point in the history
  • Loading branch information
jpquast committed Sep 29, 2024
1 parent 356b0b4 commit 6909b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/try_query.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ try_query <-
options(readr.show_progress = FALSE)

# Check if the content is gzip compressed
if (query_result$headers[["content-encoding"]] == "gzip") {
if (!is.null(query_result$headers[["content-encoding"]]) && query_result$headers[["content-encoding"]] == "gzip") {
# Retrieve the content as raw bytes using httr::content
raw_content <- httr::content(query_result, type = "raw")

Expand Down

0 comments on commit 6909b03

Please sign in to comment.