Skip to content

Commit 6efb84b

Browse files
committed
Correct usage is .content for bytes, not .data()
1 parent 84cff3f commit 6efb84b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

livekit-api/livekit/api/twirp_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def sync_request(
115115

116116
serialized_data = data.SerializeToString()
117117
resp = requests.post(url, headers=headers, data=serialized_data)
118-
if resp.status == 200:
119-
return response_class.FromString(resp.data())
118+
if resp.status_code == 200:
119+
return response_class.FromString(resp.content)
120120
else:
121121
# when we have an error, Twirp always encode it in json
122122
error_data = resp.json()

0 commit comments

Comments
 (0)