plumber R
Snippet R kanggo plumber sing mangsuli request menyang /pixel.gif nganggo empty GIF, sing didekode sepisan nalika startup.
plumber R
# plumber.R
gif <- jsonlite::base64_dec("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==")
#* @get /pixel.gif
#* @serializer contentType list(type = "image/gif")
function(res) {
res$setHeader("Cache-Control", "no-store")
gif
}
Snippet iki wis dilakokake lan byte asile wis dibandhingake.
Priksa
curl -sI http://localhost:8080/pixel.gif