Commit 8fb3bed8 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Lets content be tab or csv

parent 37435642
......@@ -47,7 +47,8 @@ getWebServiceData <- function(obs_url, ...){
return(invisible(NULL))
}
if(headerInfo$`content-type` %in% c("text/tab-separated-values;charset=UTF-8")){
if(headerInfo$`content-type` %in% c("text/tab-separated-values;charset=UTF-8",
"text/csv;charset=UTF-8")){
returnedDoc <- httr::content(returnedList, type="text",encoding = "UTF-8")
} else if (headerInfo$`content-type` %in%
c("application/zip",
......@@ -61,7 +62,7 @@ getWebServiceData <- function(obs_url, ...){
return(txt)
} else {
returnedDoc <- httr::content(returnedList,encoding = "UTF-8")
if(grepl("No sites/data found using the selection criteria specified", returnedDoc)){
if(all(grepl("No sites/data found using the selection criteria specified", returnedDoc))){
message(returnedDoc)
}
if(headerInfo$`content-type` == "text/xml"){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment