From 48a6f7b6c8f03beb1bdec1e3ea28c5ed3f419e8f Mon Sep 17 00:00:00 2001 From: James McMahon Date: Tue, 4 Feb 2025 15:00:57 +0000 Subject: [PATCH 1/3] Update phs_GET.R --- R/phs_GET.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/R/phs_GET.R b/R/phs_GET.R index ac27318..ad76f3d 100644 --- a/R/phs_GET.R +++ b/R/phs_GET.R @@ -31,9 +31,7 @@ phs_GET <- function(action, query, verbose = FALSE, call = rlang::caller_env()) } # Extract the content from the HTTP response - content <- httr::content( - response - ) + content <- httr::content(response, guess_max = Inf) # detect/handle errors error_check(content, call = call) From c65d623b12774ea6a078f9fa2632f38f2803842b Mon Sep 17 00:00:00 2001 From: James McMahon Date: Tue, 4 Feb 2025 15:25:57 +0000 Subject: [PATCH 2/3] Add test --- tests/testthat/test-get_resource.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testthat/test-get_resource.R b/tests/testthat/test-get_resource.R index f502f58..0402630 100644 --- a/tests/testthat/test-get_resource.R +++ b/tests/testthat/test-get_resource.R @@ -20,6 +20,8 @@ test_that("returns data in the expected format", { expect_named(data_q, c("PracticeCode", "AddressLine1")) expect_equal(data_q[["PracticeCode"]], 10002) + + expect_no_warning(get_resource("3e86b6fb-2062-4f05-8f4d-0bb001155d64"), "One or more parsing issues," }) test_that("returns data with row specifications", { From 0162a4840042a6220f99ded87fad804187fb0525 Mon Sep 17 00:00:00 2001 From: James McMahon Date: Tue, 4 Feb 2025 15:34:31 +0000 Subject: [PATCH 3/3] Update test-get_resource.R --- tests/testthat/test-get_resource.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-get_resource.R b/tests/testthat/test-get_resource.R index 0402630..cb92ad5 100644 --- a/tests/testthat/test-get_resource.R +++ b/tests/testthat/test-get_resource.R @@ -21,7 +21,7 @@ test_that("returns data in the expected format", { expect_named(data_q, c("PracticeCode", "AddressLine1")) expect_equal(data_q[["PracticeCode"]], 10002) - expect_no_warning(get_resource("3e86b6fb-2062-4f05-8f4d-0bb001155d64"), "One or more parsing issues," + expect_no_warning(get_resource("3e86b6fb-2062-4f05-8f4d-0bb001155d64")) }) test_that("returns data with row specifications", {