Skip to content

Commit

Permalink
Merge pull request #22 from almahmoud/master
Browse files Browse the repository at this point in the history
Handle accepts bigger than length 1
  • Loading branch information
bergant authored May 14, 2022
2 parents 82f2104 + 35da2e7 commit a14947c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/operations.R
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ get_operations <- function(api, .headers = NULL, path = NULL,
get_accept <- function(op_def) {
if (is.null(op_def$produces)) {
httr::accept_json()
} else if(length(op_def$produces) > 1) {
for(each in op_def$produces) {
httr::accept(each)
}
} else {
httr::accept(op_def$produces)
}
Expand Down

0 comments on commit a14947c

Please sign in to comment.