Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

POST Fetch with timeout in URL Loops Requests 10 times

  • Pa përgjigje
  • 0 e kanë hasur këtë problem
more options

Scenario: I am running a node.js UI that proxies requests to the backend API. When `timeout=10` (or any valid timeout) is located in the request URL, the request will be proxied at the timeout interval ten times. In this example, every ten seconds it will reattempt for ten attempts.

If I run the same code in another browser's console, it is only executed once.

I am suspecting that there is some pre-parsing of the URL that is occurring that is making this happen.

Fetch Command: ``` await fetch("http://localhost:8080/config?timeout=10", {

   "credentials": "omit",
   "headers": {
       "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0",
       "Accept": "application/json",
       "Accept-Language": "en-US,en;q=0.5",
       "Content-Type": "application/json",
       "Sec-Fetch-Dest": "empty",
       "Sec-Fetch-Mode": "cors",
       "Sec-Fetch-Site": "same-origin",
       "Priority": "u=0",

"Timeout": 40

   },
   "referrer": "http://localhost:8080/swagger/index.html?config=/config/swagger",
   "method": "POST",
   "mode": "cors"

}); ```

In the POST API, there is a 30 second sleep, then it raises a 408 error code.

Environment: Firefox 132.0.2 (64-bit) Windows 10

Scenario: I am running a node.js UI that proxies requests to the backend API. When `timeout=10` (or any valid timeout) is located in the request URL, the request will be proxied at the timeout interval ten times. In this example, every ten seconds it will reattempt for ten attempts. If I run the same code in another browser's console, it is only executed once. I am suspecting that there is some pre-parsing of the URL that is occurring that is making this happen. Fetch Command: ``` await fetch("http://localhost:8080/config?timeout=10", { "credentials": "omit", "headers": { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0", "Accept": "application/json", "Accept-Language": "en-US,en;q=0.5", "Content-Type": "application/json", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin", "Priority": "u=0", "Timeout": 40 }, "referrer": "http://localhost:8080/swagger/index.html?config=/config/swagger", "method": "POST", "mode": "cors" }); ``` In the POST API, there is a 30 second sleep, then it raises a 408 error code. Environment: Firefox 132.0.2 (64-bit) Windows 10

Duhet të bëni hyrjen te llogaria juaj që t’i përgjigjeni postimeve. Ju lutemi, filloni me një pyetje të re, nëse nuk keni ende një llogari.