parameters: (response)
docstring: Check the Content-Type header to ensure the response contains HTML.
  
      Raises `_NotHTML` if the content type is not text/html.
docstring_summary: Check the Content-Type header to ensure the response contains HTML.
docstring_tokens: Check the Content - Type header to ensure the response contains HTML .
function: def _ensure_html_header(response):
      # type: (Response) -> None
      """Check the Content-Type header to ensure the response contains HTML.
  
      Raises `_NotHTML` if the content type is not text/html.
      """
      content_type = response.headers.get("Content-Type", "")
      if not content_type.lower().startswith("text/html"):
          raise _NotHTML(content_type, response.request.method)
function_tokens: def _ensure_html_header ( response ) : # type: (Response) -> None content_type = response . headers . get ( "Content-Type" , "" ) if not content_type . lower ( ) . startswith ( "text/html" ) : raise _NotHTML ( content_type , response . request . method )