Conditional GETs
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by tracing plumber2's GET/HEAD route handling and the existing ETag tag creation functionality mentioned in issue #75. Review the conditional-request reference, then define how the proposed @etag value would be generated and compared. Done means matching GET/HEAD requests return 304 without a response body, while initial 200 responses include the generated ETag.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
It would be neat if plumber2 supported conditional GETs out of the box. I suspect I could use the tag creation functionality to do it myself, but it would be a nice to have for improving server-side rendered HTML applications.
Using an etag, plumber2 could automatic respond with a 304 Not Modified and short-circuit the response if the client's If-None-Match matches the server. This would speed up server responses and reduce repetitive computations. Perhaps the etag generation mechanism could be specified by a roxygen tag too.
Eg
#' @get /
#' @etag Sys.Date()
function() {
my_html()
}
In this example, on a 200 OK, the server would return the normal response body as well as etag generated via Sys.Date(). Subsequent gets from the same client would return a 304 to the client if the client's etag date matches the server's (via string equality).
Scope: only applies to GET/HEAD routes, & no response body is sent
References
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Conditional_requests
- https://api.rubyonrails.org/classes/ActionController/ConditionalGet.html
As an aside (and probably out of scope for this issue), being able to have a @cache tag to automatically cache responses would be nice. We can do this manually atm via eg memoise and client id, but it would make these patterns more discoverable and feel more "batteries included" particularly for SSR purposes
- Lenguaje dominante
- R
- Estrellas
- 119
- Forks
- 17
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de posit-dev/plumber2
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
`except` argument in `Plumber2$add_shiny` method is not respectedPosiblemente ocupada @cgiachalis la tomó hace 139 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Update vignette `hosting.qmd`Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
-
Development RoadmapAbierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 20/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
Todos los issues de posit-dev/plumber2
Issues similares
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothAbiertoarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Apich-Organization/rssn#383 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PRL-PRG/r-compile-server#70 · 1 comentario ·
-
dependencies docker enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
posit-dev/images-workbench#257 ·
Los mantenedores suelen responder en 1 día
-
dependencies docker enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
posit-dev/images-package-manager#188 ·
Los mantenedores suelen responder en 1 día
-
dependencies docker enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
posit-dev/images-connect#222 ·
Los mantenedores suelen responder en 1 día