responses icon indicating copy to clipboard operation
responses copied to clipboard

[feature request] give some indication if a response is taken from record

Open nschloe opened this issue 9 months ago • 2 comments

In some cases, I need to know if a response comes from the record. If I see correctly, there currently is no way to do that.

requests-cache does this by adding a .from_cache property to the response. Perhaps responses could add .from_record.

nschloe avatar Mar 28 '25 14:03 nschloe

In some cases, I need to know if a response comes from the record. If I see correctly, there currently is no way to do that.

What are the scenarios you need to do this in? Do you have an example?

markstory avatar Mar 28 '25 14:03 markstory

Some requests contain a notion of the "current" time. What's current now isn't current anymore if the request is fetched from cache or record, so my code needs to know if any of the latter is the case to modify its assertions.

nschloe avatar Mar 28 '25 14:03 nschloe