MCPcopy
hub / github.com/aio-libs/aiohttp / if_modified_since

Method if_modified_since

aiohttp/web_reqrep.py:230–241  ·  view source on GitHub ↗

The value of If-Modified-Since HTTP header, or None. This header is represented as a `datetime` object.

(self, _IF_MODIFIED_SINCE=hdrs.IF_MODIFIED_SINCE)

Source from the content-addressed store, hash-verified

228
229 @reify
230 def if_modified_since(self, _IF_MODIFIED_SINCE=hdrs.IF_MODIFIED_SINCE):
231 """The value of If-Modified-Since HTTP header, or None.
232
233 This header is represented as a `datetime` object.
234 """
235 httpdate = self.headers.get(_IF_MODIFIED_SINCE)
236 if httpdate is not None:
237 timetuple = parsedate(httpdate)
238 if timetuple is not None:
239 return datetime.datetime(*timetuple[:6],
240 tzinfo=datetime.timezone.utc)
241 return None
242
243 @reify
244 def keep_alive(self):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected