Skip to content

Commit

Permalink
Fixed double quote on '"Authorization": f"{cls._headers['Authorizatio…
Browse files Browse the repository at this point in the history
…n']}"' and remove print
  • Loading branch information
Andrea Cagnola committed Sep 6, 2024
1 parent 73fdadb commit b1edfae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pymammotion/http/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,16 @@ async def login(cls, session: ClientSession, username: str, password: str) -> Re

@classmethod
async def get_stream_subscription(cls, iot_id: str) -> Response[StreamSubscriptionResponse]:
"""Get agora.io data for view camera stream"""
print(cls._headers["Authorization"])
"""Get agora.io data for view camera stream"""
async with ClientSession('https://domestic.mammotion.com') as session:
async with session.post(
"/device-server/v1/stream/subscription",
json={
"deviceId" : iot_id
},
headers={
"Authorization": f"{cls._headers["Authorization"]}",
"Content-Type": "application/json" # Se necessario
"Authorization": f"{cls._headers['Authorization']}",
"Content-Type": "application/json"
}
) as resp:
if resp.status == 200:
Expand Down

0 comments on commit b1edfae

Please sign in to comment.