我不断得到"意外的输出结束" response.json()上的错误。我是不是基于我在下面做的事情?
Promise.all([requestOne, requestTwo])
.then(responses => {
responses.reduce((promise,response) => {
return promise.then(() => {
return response.json()
}).then(result => result)
}, Promise.resolve());
})
答案 0 :(得分:1)
修改,更新
问题是python2.7/site-packages/django/contrib/auth/backends.py:
123 return
124 user = None
125: username = self.clean_username(remote_user)
126
127 UserModel = get_user_model()
...
143 return user
144
145: def clean_username(self, username):
146 """
147 Performs any cleaning on the "username" prior to using it to get or
python2.7/site-packages/django/contrib/auth/middleware.py:
78 # persisted in the session and we don't need to continue.
79 if request.user.is_authenticated():
80: if request.user.get_username() == self.clean_username(username, request):
81 return
82 else:
..
94 auth.login(request, user)
95
96: def clean_username(self, username, request):
97 """
98 Allows the backend to clean the username, if the backend defines a
99: clean_username method.
100 """
101 backend_str = request.session[auth.BACKEND_SESSION_KEY]
102 backend = auth.load_backend(backend_str)
103 try:
104: username = backend.clean_username(username)
105: except AttributeError: # Backend has no clean_username method.
106 pass
107 return username
7 matches across 2 files
设置为{mode:"no-cors"}
。在fetch
来电
{method: "get"}
{mode:"no-cors"}