From 35da2e7f004ceb242fea9086e1a87064096d90a8 Mon Sep 17 00:00:00 2001 From: Alexandru Mahmoud Date: Fri, 13 May 2022 15:08:16 -0400 Subject: [PATCH] Handle accepts bigger than length 1 --- R/operations.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/operations.R b/R/operations.R index 87821a0..283354e 100644 --- a/R/operations.R +++ b/R/operations.R @@ -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) }