InAppPy icon indicating copy to clipboard operation
InAppPy copied to clipboard

[BUG] Async example wrong

Open Kylmakalle opened this issue 4 years ago • 0 comments

Seems like session for validator creates only on __aenter__

File "inapppy/asyncio/appstore.py", line 47, in validate
    api_response = await self.post_json(receipt_json)
  File "inapppy/asyncio/appstore.py", line 30, in post_json
    async with self._session.post(
AttributeError: 'NoneType' object has no attribute 'post'

Working example for me

async with validator:
    validation_result = await validator.validate(...)

Kylmakalle avatar Oct 28 '19 13:10 Kylmakalle