class_docstr: Standalone WSGI app that can serve files, etc.
class_docstr_tok: ["Standalone","WSGI","app","that","can","serve","files",",","etc","."]
docstr: Construct a werkzeug WSGI response object.
  
  Args:
    request: A werkzeug Request object. Used mostly to check the
      Accept-Encoding header.
    content: Payload data as bytes or unicode string (will be UTF-8 encoded).
    content_type: Media type only - "charset=utf-8" will be added for text.
    code: Numeric HTTP status code to use.
    expires: Second duration for browser caching, default 0.
    content_encoding: Encoding if content is already encoded, e.g. 'gzip'.
  
  Returns:
    A werkzeug Response object (a WSGI application).
docstr_tok: ["Construct","a","werkzeug","WSGI","response","object",".","Args",":","request",":","A","werkzeug","Request","object",".","Used","mostly","to","check","the","Accept-Encoding","header",".","content",":","Payload","data","as","bytes","or","unicode","string","(","will","be","UTF-8","encoded",")",".","content_type",":","Media","type","only","-","``","charset=utf-8","''","will","be","added","for","text",".","code",":","Numeric","HTTP","status","code","to","use",".","expires",":","Second","duration","for","browser","caching",",","default","0.","content_encoding",":","Encoding","if","content","is","already","encoded",",","e.g",".","'gzip","'",".","Returns",":","A","werkzeug","Response","object","(","a","WSGI","application",")","."]
code: def respond(  # pylint: disable=invalid-name
      self,
      request,
      content,
      content_type,
      code=200,
      expires=0,
      content_encoding=None,
  ):
      """Construct a werkzeug WSGI response object.
  
      Args:
        request: A werkzeug Request object. Used mostly to check the
          Accept-Encoding header.
        content: Payload data as bytes or unicode string (will be UTF-8 encoded).
        content_type: Media type only - "charset=utf-8" will be added for text.
        code: Numeric HTTP status code to use.
        expires: Second duration for browser caching, default 0.
        content_encoding: Encoding if content is already encoded, e.g. 'gzip'.
  
      Returns:
        A werkzeug Response object (a WSGI application).
      """
      if isinstance(content, six.text_type):
          content = content.encode("utf-8")
      if content_type in self._TEXTUAL_MIMETYPES:
          content_type += "; charset=utf-8"
      headers = []
      headers.append(("Content-Length", str(len(content))))
      if content_encoding:
          headers.append(("Content-Encoding", content_encoding))
      if expires > 0:
          e = wsgiref.handlers.format_date_time(
              time.time() + float(expires)
          )
          headers.append(("Expires", e))
          headers.append(
              ("Cache-Control", "private, max-age=%d" % expires)
          )
      else:
          headers.append(("Expires", "0"))
          headers.append(("Cache-Control", "no-cache, must-revalidate"))
      if request.method == "HEAD":
          content = None
      return wrappers.Response(
          response=content,
          status=code,
          headers=headers,
          content_type=content_type,
      )
  
file_path: lit/lit_nlp/lib/wsgi_app.py
imports: import mimetypes
  import os
  import time
  import traceback
  import wsgiref.handlers
  from absl import logging
  import six
  from six.moves.urllib.parse import urlparse
  from werkzeug import wrappers
label_desc: Use image node_id 2 for calling the App obj's underlying member method code with example usage: obj.respond(request, content, content_type, code, expires, content_encoding) and returns: wrappers