@@ -111,7 +111,7 @@ async def requestDeviceAuthorization(self, options: dict) -> Union[Dict, ErrorDa
111
111
"code_challenge" : options ["code_challenge" ],
112
112
"code_challenge_method" : options ["code_challenge_method" ],
113
113
}
114
- async with aiohttp .ClientSession () as session :
114
+ async with aiohttp .ClientSession (headers = { "user-agent" : "" } ) as session :
115
115
async with session .post (QWEN_OAUTH_DEVICE_CODE_ENDPOINT , headers = {
116
116
"Content-Type" : "application/x-www-form-urlencoded" ,
117
117
"Accept" : "application/json" ,
@@ -133,7 +133,7 @@ async def pollDeviceToken(self, options: dict) -> Union[Dict, ErrorDataDict]:
133
133
"device_code" : options ["device_code" ],
134
134
"code_verifier" : options ["code_verifier" ],
135
135
}
136
- async with aiohttp .ClientSession () as session :
136
+ async with aiohttp .ClientSession (headers = { "user-agent" : "" } ) as session :
137
137
async with session .post (QWEN_OAUTH_TOKEN_ENDPOINT , headers = {
138
138
"Content-Type" : "application/x-www-form-urlencoded" ,
139
139
"Accept" : "application/json" ,
@@ -158,7 +158,7 @@ async def refreshAccessToken(self) -> Union[Dict, ErrorDataDict]:
158
158
"refresh_token" : self .credentials ["refresh_token" ],
159
159
"client_id" : QWEN_OAUTH_CLIENT_ID ,
160
160
}
161
- async with aiohttp .ClientSession () as session :
161
+ async with aiohttp .ClientSession (headers = { "user-agent" : "" } ) as session :
162
162
async with session .post (QWEN_OAUTH_TOKEN_ENDPOINT , headers = {
163
163
"Content-Type" : "application/x-www-form-urlencoded" ,
164
164
"Accept" : "application/json" ,
0 commit comments