We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b61d5a4 commit 7e371ccCopy full SHA for 7e371cc
1 file changed
src/blueapi/client/rest.py
@@ -278,12 +278,14 @@ def _request_and_deserialize(
278
279
def run_blocking(self, req: TaskRequest):
280
url = self._ws_address().unicode_string().removesuffix("/") + "/run_plan"
281
+ headers = {}
282
+ if self._session_manager:
283
+ auth = self._session_manager.get_valid_access_token()
284
+ headers["Authorization"] = f"Bearer {auth}"
285
with connect(
286
url,
- additional_headers={
- "Cookie": "Authorization=Bearer cook",
- "Authorization": "Bearer head",
- },
287
+ additional_headers=headers,
288
+ user_agent_header="blueapi cli",
289
) as ws:
290
ws.send(req.model_dump_json())
291
for message in ws:
0 commit comments