@app.route("<STR_LIT>", methods=("<STR_LIT:GET>",))<EOL>def etag(etag):
if_none_match = parse_multi_value_header(request.headers.get("<STR_LIT>"))<EOL>if_match = parse_multi_value_header(request.headers.get("<STR_LIT>"))<EOL>if if_none_match:<EOL><INDENT>if etag in if_none_match or "<STR_LIT:*>" in if_none_match:<EOL><INDENT>response = status_code(<NUM_LIT>)<EOL>response.headers["<STR_LIT>"] = etag<EOL>return response<EOL><DEDENT><DEDENT>elif if_match:<EOL><INDENT>if etag not in if_match and "<STR_LIT:*>" not in if_match:<EOL><INDENT>return status_code(<NUM_LIT>)<EOL><DEDENT><DEDENT>response = view_get()<EOL>response.headers["<STR_LIT>"] = etag<EOL>return response<EOL>
Assumes the resource has the given etag and responds to If-None-Match and If-Match headers appropriately.
    ---
    tags:
      - Response inspection
    parameters:
      - in: header
        name: If-None-Match
      - in: header
        name: If-Match
    produces:
      - application/json
    responses:
      200:
        description: Normal response
      412:
        description: match