Skip to content
Discussion options

You must be logged in to vote

This is not something react-query can or will support out of the box because it is not something that react-query is concerned with. React-Query is an async state manager - it is not tied to data fetching, and thus cannot know about http headers.

Isn't that something that browser would do automatically?

For example:

  • if the server responds with an ETag, browsers will send the ETag back as an if-none-match header.
  • if the server responds with a Last-Modified header, browsers will send that timestamp back as If-Modified-since

at least that's what I though so far. Would be weird if clients had to manage those dates by themselves 🤔

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ranger-ross
Comment options

Answer selected by ranger-ross
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants