Skip to content

!!! does not work with req_headers_redacted() #647

Description

@atheriel

I've noticed that !!! works for req_headers() but not for req_headers_redacted():

library(httr2)
x <- list("x-api-key" = "secret", "x-api-version" = "2025-01-01")
req_headers(
  request("https://posit.co"),
  !!!x
)
#> <httr2_request>
#> GET https://posit.co
#> Headers:
#> • x-api-key: "secret"
#> • x-api-version: "2025-01-01"
#> Body: empty
req_headers_redacted(
  request("https://posit.co"),
  !!!x
)
#> Error in !x: invalid argument type

Created on 2025-01-21 with reprex v2.1.1

Pretty sure this is due to the use of list(...) in the source of the req_headers_redacted() rather than list2(...), as used in req_headers().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions