CodeForPhilly / CodeForPhilly/stately

Queue xhr requests until auth completed

Abierto
#58 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
22
Forks
5
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

In [index.js](https://github.com/CodeForPhilly/stately/blob/master/client/src/index.js) we're currently breaking the choo paradigm by firing an xhr request out in the wild, before even initialising the app. This is necessary because all the subsequent requests depend on the session that should be set by that initial request.

I was thinking that one of the only other ways to accommodate this would be to "queue" any subsequent xhr requests until the initial auth request is completed (since subsequent requests happen asynchronously). I thought it was crazy, but @yoshuawuyts just thought of the same thing, so maybe it's not so nuts. We'd just want to ensure that queuing is explicit so there's no magic, ie.

``` javascript
xhr({uri: '...'}, waitForAuth=True)
```

(but, ya know, in javascript not python)

This is definitely "backlog"

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.