11 ms·
I really wish htmx would use fetch rather than xhr, and now it looks like that won’t happen. Fetch is easier to proxy, so it would open up a lot more possibilit
by logankeenan 2y ago
I really wish htmx would use fetch rather than xhr, and now it looks like that won’t happen. Fetch is easier to proxy, so it would open up a lot more possibilities for backends, like ones running in browser or a native process. I had to hack together a xhr fetch proxy to make this happen.
https://github.com/logankeenan/xhr-fetch-proxy https://github.com/logankeenan/xhr-fetch-proxy
- recursivedoubts 2y agowe've looked at doing it but unfortunately fetch() doesn't fire upload events which would make implementing some events triggered by htmx possible it's too bad the two APIs have overlapping but not contained functionality.
- logankeenan 2y agoAre the upload events specifically used for files or for most server interactions. I haven’t noticed any issues with my proxy yet…