aiohttp.hdrs.IF_NONE_MATCH

Here are the examples of the python api aiohttp.hdrs.IF_NONE_MATCH taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: sockjs Source File: route.py
    def iframe(self, request):
        cached = request.headers.get(hdrs.IF_NONE_MATCH)
        if cached:
            response = web.Response(status=304)
            response.headers.extend(cache_headers())
            return response

        return web.Response(
            body=self.iframe_html,
            content_type='text/html',
            headers=((hdrs.ETAG, self.iframe_html_hxd),) + cache_headers())