#FetchAPI

2025-05-19

Turns out, the easiest way to convert a "data:" URL to a JavaScript Blob object is not to split the URL into mime type, encoding, and data, and then, based on the encoding, do some wild atob() shenanigans

but instead

fetch(data_url).then(res => res.blob()).then(blob => โ€ฆ)

๐Ÿ™ˆ ๐Ÿ˜‚

#JavaScript #FetchAPI

Inautiloinautilo
2025-04-03
2024-10-21

I'm trying to track down a weird issue with using #streams as request body for #fetchapi requests in the #browser. After the first chunk is read, the connection stalls and the server never receives any data. It seems to be related to #http3 / #quic. When I downgrade the http reverse proxy to #http2, it works fine.

Has anyone experienced this too? Are streaming request bodies not compatible with http3? (as currently implemented in #chromium)

#javascript #http #chrome #webdev #nodejs

2023-09-25

#DailyBloggingChallenge (61/100)

The #PetProject continues with a custom date picker instead of using a predefined component from #vue to learn more how the library is built.

Also chose to use the #fetchAPI over #axios, mainly because I am more familiar with the former. With this the app has HTTP access and converts the XML response from OSM to JSON.

2023-09-06

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst