From 5badba134bd2b1b19953390139e63f90b1c145f1 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Tue, 7 Nov 2023 13:04:13 -0500 Subject: [PATCH] Use req_method_get in load_response for httr2 1.0 compat --- R/mock-api.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/mock-api.R b/R/mock-api.R index 213601c..49bde47 100644 --- a/R/mock-api.R +++ b/R/mock-api.R @@ -121,7 +121,7 @@ load_response <- function(file, req) { } else if (ext %in% names(EXT_TO_CONTENT_TYPE)) { response( url = req$url, - method = req$method, + method = get_request_method(req), headers = list(`Content-Type` = EXT_TO_CONTENT_TYPE[[ext]]), status_code = 200L, body = readBin(file, "raw", n = file.size(file)) @@ -129,7 +129,7 @@ load_response <- function(file, req) { } else if (ext == "204") { response( url = req$url, - method = req$method, + method = get_request_method(req), status_code = 204L ) } else {