Skip to content

Commit

Permalink
essaie de corriger le timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-lamarche committed Dec 28, 2024
1 parent 22078d3 commit 560d4a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utile.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ listerDonnees <- function(){
url <- "https://api.insee.fr/melodie/catalog/all"
appel_melodi <- tryCatch(httr::GET(url),
error = function(e) message(e$message))
if (class(appel_melodi) == "response" & appel_melodi$status_code == 200){
if (length(appel_melodi) != 0 & appel_melodi$status_code == 200){
catalogue <- jsonlite::fromJSON(httr::content(appel_melodi, as = "text", encoding = "UTF-8"),
simplifyDataFrame = FALSE)
res <- c(res,
Expand Down

0 comments on commit 560d4a0

Please sign in to comment.