Skip to content

Commit

Permalink
ch: remove redundant calls to convert_body()
Browse files Browse the repository at this point in the history
  • Loading branch information
kennedymwavu committed Nov 12, 2024
1 parent 56e53bc commit 22ba149
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/response.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Response <- R6::R6Class(
deprecated_headers(headers)
deprecated_status(status)
headers <- private$.get_headers(headers)
response(status = private$.get_status(status), headers = headers, body = convert_body(body))
response(status = private$.get_status(status), headers = headers, body = body)
},
#' @details Send a plain HTML response, pre-processed with sprintf.
#' @param body Body of the response.
Expand All @@ -125,7 +125,7 @@ Response <- R6::R6Class(
deprecated_status(status)
body <- sprintf(body, ...)
headers <- private$.get_headers(headers)
response(status = private$.get_status(status), headers = headers, body = convert_body(body))
response(status = private$.get_status(status), headers = headers, body = body)
},
#' @details Send a plain text response.
#' @param body Body of the response.
Expand All @@ -136,7 +136,7 @@ Response <- R6::R6Class(
deprecated_status(status)
headers <- private$.get_headers(headers)
headers[["Content-Type"]] <- content_plain()
response(status = private$.get_status(status), headers = headers, body = convert_body(body))
response(status = private$.get_status(status), headers = headers, body = body)
},
#' @details Send a file.
#' @param file File to send.
Expand Down

0 comments on commit 22ba149

Please sign in to comment.