conditional-get icon indicating copy to clipboard operation
conditional-get copied to clipboard

Quick explanation of how this is supposed to work

Open amit777 opened this issue 4 years ago • 1 comments

I was wondering if you could provide a quick overview of the concept behind this middleware. I'm trying to get a better understanding of how it works with the etag middleware. The code looks so simple, so I feel like I'm missing something very basic.

Specifically, I see some code to check ctx.fresh and then return 304. But I don't see how ctx.fresh is supposed to get set.

amit777 avatar Feb 22 '21 15:02 amit777

I hope this will help you.

  1. ctx.fresh is from Koa Request API

image

  1. About setEtag : Koa Etag

yaooojia avatar Jun 09 '21 10:06 yaooojia