library(webqueue)
header(name = 'Location', value = '/index.html')
Location <- '/index.html'
header(Location)
response(307L, header(Location = '/index.html'))
# Allow javascript to access a header value
header('x-user-id' = 100, expose = TRUE)
Run the code above in your browser using DataLab