Skip to content

Commit

Permalink
Add HTTP status code checker
Browse files Browse the repository at this point in the history
  • Loading branch information
DvaMishkiLapa committed May 12, 2023
1 parent 783fdef commit 8720c18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aparser_async_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async def doRequest(self, action: str, data=None, options: dict = {}):
headers = {'Content-Type': 'application/json; charset=utf-8'}

async with self._session.post(self.uri, data=body, headers=headers) as response:
assert response.status in (200, 201), response.status
data = await response.json()
return data

Expand Down

0 comments on commit 8720c18

Please sign in to comment.