@abc.abstractmethod<EOL><INDENT>def close(self):<DEDENT>
<EOL>self.require_not_closed()<EOL>if not self.streaming or self.asynchronous:<EOL><INDENT>if '<STR_LIT>' not in self.headers:<EOL><INDENT>self.headers['<STR_LIT>'] = self.tell()<EOL><DEDENT><DEDENT>self.flush()<EOL>self._closed = True<EOL>
Flush and close the stream.

        This is called automatically by the base resource on resources
        unless the resource is operating asynchronously; in that case,
        this method MUST be called in order to signal the end of the request.
        If not the request will simply hang as it is waiting for some
        thread to tell it to return to the client.