mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
Adapting protobuf example to use actix_protobuf
This commit is contained in:
@ -46,7 +46,7 @@ async def fetch(session):
|
||||
obj = test_pb2.MyObj()
|
||||
obj.number = 9
|
||||
obj.name = 'USB'
|
||||
async with session.post('http://localhost:8080/', data=obj.SerializeToString(),
|
||||
async with session.post('http://localhost:8081/', data=obj.SerializeToString(),
|
||||
headers={"content-type": "application/protobuf"}) as resp:
|
||||
print(resp.status)
|
||||
data = await resp.read()
|
||||
|
Reference in New Issue
Block a user