Skip to main content

quote_etag

If the provided string is already a quoted ETag, return it. Otherwise, wrap the string in quotes, making it a strong ETag.

def quote_etag(
etag_str: string
) - > string

If the provided string is already a quoted ETag, return it. Otherwise, wrap the string in quotes, making it a strong ETag.

Parameters

NameTypeDescription
etag_strstringThe ETag value to be validated or quoted, typically representing a resource version identifier.

Returns

TypeDescription
stringThe original string if already quoted, or the string wrapped in double quotes to form a valid strong ETag.