Skip to content

Header and cookie parameters #84

@jonthegeek

Description

@jonthegeek

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)

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions