library(webqueue)
response(list(name = unbox('Peter'), pi = pi))
response(307L, Location = '/new/file.html')
# The `body` and `status` slots also handle header objects.
response(cookie(id = 123, http_only = TRUE))
# Allow javascript to access custom headers.
uid <- header('x-user-id' = 100, expose = TRUE)
sid <- header('x-session-id' = 303, expose = TRUE)
response(uid, sid)
Run the code above in your browser using DataLab