Closed Andreas4242 closed 2 years ago
Ok I seem have found the solution in the doku:
In order to resolve problem above we would need to either register application/x-rds content handler with ContentHandlers$set_encode() or manually specify encode function (identity in our case):
application$add_get(path = "/factorial-rds2", function(.req, .res) {
x = as.integer(.req$get_param_query("x"))
result = factorial(x)
body_rds = serialize(list(result = result), connection = NULL)
.res$set_body(body_rds)
.res$set_content_type("application/x-rds")
.res$encode = identity
})
Hi
thank you very much for making this project available!
Is it possible to serve gzip objects? I could not find a default content handler for this in the code or examples. Basically something like
application/zip, application/octet-stream
Thank you in advance, BR Andreas