Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DyfanJones committed Feb 21, 2024
1 parent e4649eb commit d6f1de7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions paws.common/R/handlers_restjson.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ restjson_build <- function(request) {
if (t == "structure" || t == "") {
request <- jsonrpc_build(request)
}
# Modified:
# Developed from boto3:
# https://github.com/boto/botocore/blob/d5b2e4ab4bc4ad84f8e0e568e70ddc8ab7f094a8/botocore/serialize.py#L671-L700
if (has_streaming_payload(request, t)) {
if (is.null(request[["http_request"]][["header"]][["Content-Type"]])) {
headers <- request[["http_request"]][["header"]]
if (is.null(headers[["Content-Type"]])) {
request[["http_request"]][["header"]][["Content-Type"]] <- "application/json"
}
if (is.null(request[["http_request"]][["header"]][["Accept"]])) {
if (is.null(headers[["Accept"]])) {
request[["http_request"]][["header"]][["Accept"]] <- "application/json"
}
}
Expand Down

0 comments on commit d6f1de7

Please sign in to comment.