예제 #1
0
    def forward(cls, url, args, method=HTTP.METHOD.POST):
        """Forward the request in block most (sync mode) to sender.

        This means I will wait for the response from sender, which would block
        following requests. This should be avoided in uweb.
        """
        assert ConfHelper.loaded
        if method.upper() not in HTTP.METHOD:
            return cls.DUMMY_RESPONSE
        else:
            args['method'] = method.upper()
            return BaseHelper.forward(cls,
                                      url,
                                      args,
                                      ConfHelper.LBMP_SENDER_CONF.url,
                                      HTTP.METHOD.POST)
예제 #2
0
파일: uwebhelper.py 프로젝트: jcsy521/ydws
    def forward(cls, url, args, method=HTTP.METHOD.POST):
        assert ConfHelper.loaded

        return BaseHelper.forward(cls,
                                  url, args, ConfHelper.UWEB_CONF.url_in, method)