Description
Minimal code-snippet showcasing the problem
authentication_client = AuthenticationClient(
app_id='x',
app_host="x",
app_secret='x',
)
token = "x"
authentication_client.get_user_info_by_access_token(token)
Expected behavior
返回用户资料
Actual behavior
return session.request(method=method, url=url, **kwargs)
E TypeError: request() got an unexpected keyword argument 'token'
我看了下代码,应该在ProtocolHttpClient的request方法内添加如下内容:
if "token" in kwargs:
headers["authorization"] = "Bearer %s" % kwargs.pop("token")
添加后可以正常调用该方法。