code: def receive_message(self):
          
  
          if not ('REQUEST_METHOD' in os.environ
                  and os.environ['REQUEST_METHOD'] == 'POST'):
              print("Status: 405 Method not Allowed; only POST is accepted")
              exit(0)
  
          # POST
          content_length = int(os.environ['CONTENT_LENGTH'])
          request_json = sys.stdin.read(content_length)
          request_json = urlparse.unquote(request_json)
          # context isn't used with cgi
          return None, request_json
docs: Receive a message from the transport.
  
          Blocks until a message has been received. May return a context
          opaque to clients that should be passed to :py:func:`send_reply`
          to identify the client later on.
  
          :return: A tuple consisting of ``(context, message)``.