has_vary_header
Check to see if the response has a given header name in its Vary header.
def has_vary_header(
response: HttpResponse,
header_query: string
) - > boolean
Check to see if the response has a given header name in its Vary header.
Parameters
| Name | Type | Description |
|---|---|---|
| response | HttpResponse | The HTTP response object containing headers to be inspected |
| header_query | string | The specific header name to search for within the response's Vary header |
Returns
| Type | Description |
|---|---|
boolean | True if the specified header name is present within the comma-delimited Vary header of the response, False otherwise |