Intended to be used from endpoint target function. Note Content-Type headers are handled by returning arg to endpoint.

porcelain_add_headers(data, headers)

Arguments

data

Response data

headers

Named list of headers to add.

Value

Data from endpoint target with headers

Examples

porcelain_add_headers("output",
                   list("Content-Dispotition" = "output_file.txt"))
#> [1] "output"
#> attr(,"porcelain_headers")
#> attr(,"porcelain_headers")$`Content-Dispotition`
#> [1] "output_file.txt"
#>