Relative Content

Tag Archive for javascriptfetch-api

Multiple execution of fetch

I have built a javascript function to create a project (= picture + title + category)
using an API using fetch. After the response of the API, I modify DOM to display the new list of projects.
Initially, the fetch was going well but now it is executed multiple time without any request.
The first project is created properly (once) but as soon as I create a second project, it is sent twice (2 projects created). If I create an other project after, it is created 3 ou 4 time. Then the next project will be created 6 or 7 time, etc…

Override JSON Parser in fetch

I am writing a golang program, that sends large int64s, but the integers lose precision due to JS storing them internally as float64s. I found the json-with-bigint library, but I am not sure how to use the library’s JSONParser function with fetch().