The response object returned by fetch can not be interacted with without mutating it. IE response.json() can only ever succeed once. Therefore, the event emitter pattern we use is inherently unsafe because you can't really control the order in which your event handlers are called. You won't know if your response.body has been read or not.
We just need to double down on the "plugin" thing for now, and probably evaluate the plugin interface in the future. For example the "helper" functions are dumb and should go away
The response object returned by fetch can not be interacted with without mutating it. IE
response.json()
can only ever succeed once. Therefore, the event emitter pattern we use is inherently unsafe because you can't really control the order in which your event handlers are called. You won't know if your response.body has been read or not.We just need to double down on the "plugin" thing for now, and probably evaluate the plugin interface in the future. For example the "helper" functions are dumb and should go away