Skip to content

Commit

Permalink
ALS-7264: Update postJSON to be flexible with response type
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Sep 8, 2024
1 parent 9d68bce commit 0c210cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/query.R
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ runQuery <- function(query, resultType = NULL) {
#' @export
getResultByQueryUUID <- function(session, queryUUID) {
queryJSON = "{}"
response = postJSON(session, paste("query/", queryUUID, "/result", sep=""), queryJSON, responseDeserializer = NULL, acceptContentType = httr::accept("application/octet-stream"))
response = postJSON(session, paste("query/", queryUUID, "/result", sep=""), queryJSON, responseDeserializer = NULL, acceptContentType = httr::accept("*/*"))
return(read.csv(text=response, sep=',', check.names=FALSE))
}

Expand Down Expand Up @@ -365,7 +365,7 @@ getCount = function(query) {

getResults = function(query) {
queryJSON = generateQueryJSON(query, expectedResultType = 'DATAFRAME')
response = postJSON(query$session, "query/sync/", queryJSON, responseDeserializer = NULL, acceptContentType = httr::accept("application/octet-stream"))
response = postJSON(query$session, "query/sync/", queryJSON, responseDeserializer = NULL, acceptContentType = httr::accept("*/*"))
return(read.csv(text=response, sep=',', check.names=FALSE))
}

Expand Down

0 comments on commit 0c210cf

Please sign in to comment.