home.social

#fetchapi — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #fetchapi, aggregated by home.social.

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. #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.

  12. #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.

  13. #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.

  14. CW: Spoilers for AoC 2019, Day 1

    Regarding the latest episode (049) of the #HackingTheGrepson podcast, I decided to make a more full-featured solution using the #FetchAPI. I now know how to pull puzzle input directly from the #adventofcode site, which is pretty cool.

    carbon.now.sh/?bg=rgba%2874%2C

  15. CW: Spoilers for AoC 2019, Day 1

    Regarding the latest episode (049) of the #HackingTheGrepson podcast, I decided to make a more full-featured solution using the #FetchAPI. I now know how to pull puzzle input directly from the #adventofcode site, which is pretty cool.

    carbon.now.sh/?bg=rgba%2874%2C

  16. CW: Spoilers for AoC 2019, Day 1

    Regarding the latest episode (049) of the #HackingTheGrepson podcast, I decided to make a more full-featured solution using the #FetchAPI. I now know how to pull puzzle input directly from the #adventofcode site, which is pretty cool.

    carbon.now.sh/?bg=rgba%2874%2C

  17. CW: Spoilers for AoC 2019, Day 1

    Regarding the latest episode (049) of the #HackingTheGrepson podcast, I decided to make a more full-featured solution using the #FetchAPI. I now know how to pull puzzle input directly from the #adventofcode site, which is pretty cool.

    carbon.now.sh/?bg=rgba%2874%2C