1
0
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:
Stefan Puhlmann
2019-05-21 22:09:27 +02:00
parent 343e240807
commit fdf061610d
4 changed files with 29 additions and 132 deletions

View File

@ -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()