Skip to content

Commit

Permalink
Use req_method_get in load_response for httr2 1.0 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
nealrichardson committed Nov 7, 2023
1 parent 8ffd589 commit 5badba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/mock-api.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ 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))
)
} else if (ext == "204") {
response(
url = req$url,
method = req$method,
method = get_request_method(req),
status_code = 204L
)
} else {
Expand Down

0 comments on commit 5badba1

Please sign in to comment.