http fetch gives different status than network?

I must be doing something wrong, but I am trying to ping a service until I get a 200 response. When I look in the network tab in my browser (chrome), I get a 304:

enter image description here

However, when I print out the following code:

const s1 = await fetch(`./${cluster}/api`)
const s2 = await fetch(`./${cluster}/dashboard`)
console.log(s1.status, s2.status)

I get:

enter image description here

It's hard to read sorry, but it says 200 200.

Why do I get a 200 when I check the status, but a 304 in the network tab?



from Recent Questions - Stack Overflow https://ift.tt/3yJmI4S
https://ift.tt/3ukeJIp

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation