Support for 304 Not Modified #4454
-
Hello, I have a query in my application that is fetching a large json object from an api (that I do not own). I have a the The API I am using supports If-Modified-Since header, but I am not exactly sure to go able implementing it with React Query. I see 2 problems:
I guess I could implement this using external state, but if React Query has a first class way to do this that would be great. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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:
at least that's what I though so far. Would be weird if clients had to manage those dates by themselves 🤔 |
Beta Was this translation helpful? Give feedback.
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-none-match
header.If-Modified-since
at least that's what I though so far. Would be weird if clients had to manage those dates by themselves 🤔