In inst/templates/paths.R (as parsed by R/generate_pkg-paths.R) and ultimately inst/templates/010-prepare.R, header params are passed to {{api_abbr}}_req_prepare() and on to nectar::req_prepare() in the body arg. While this often works, it's not correct. Instead, pass header parameters as a named list to the header argument of nectar_req_prepare().
Likewise for cookie parameters, passed as a named list to cookie.
Any new or updated tests should be tagged with "#84" in addition to anything they're already tagged with. For example, "Test something (#24)" would become "Test something (#24, #84)", and a new test description might be something like "Headers are passed to the header argument (#84)".
This will impact these files:
inst/templates/000-shared.R
inst/templates/010-prepare.R
inst/templates/paths.R
R/generate_pkg-paths.R
R/generate_pkg-prepare.R
tests/testthat/test-generate_pkg-paths.R
tests/testthat/test-generate_pkg-prepare.R
tests/testthat/_fixtures/* referenced in those tests (and likely those referenced in some other tests)
In
inst/templates/paths.R(as parsed byR/generate_pkg-paths.R) and ultimatelyinst/templates/010-prepare.R, header params are passed to{{api_abbr}}_req_prepare()and on tonectar::req_prepare()in thebodyarg. While this often works, it's not correct. Instead, pass header parameters as a named list to theheaderargument ofnectar_req_prepare().Likewise for
cookieparameters, passed as a named list tocookie.Any new or updated tests should be tagged with "#84" in addition to anything they're already tagged with. For example, "Test something (#24)" would become "Test something (#24, #84)", and a new test description might be something like "Headers are passed to the header argument (#84)".
This will impact these files:
inst/templates/000-shared.Rinst/templates/010-prepare.Rinst/templates/paths.RR/generate_pkg-paths.RR/generate_pkg-prepare.Rtests/testthat/test-generate_pkg-paths.Rtests/testthat/test-generate_pkg-prepare.Rtests/testthat/_fixtures/* referenced in those tests (and likely those referenced in some other tests)