async def post_data(self, path, data=None, headers=None, timeout=None):
url = self.base_url + path<EOL>_LOGGER.debug('<STR_LIT>', url)<EOL>self._log_data(data, False)<EOL>resp = None<EOL>try:<EOL><INDENT>resp = await self._session.post(<EOL>url, headers=headers, data=data,<EOL>timeout=DEFAULT_TIMEOUT if timeout is None else timeout)<EOL>if resp.content_length is not None:<EOL><INDENT>resp_data = await resp.read()<EOL><DEDENT>else:<EOL><INDENT>resp_data = None<EOL><DEDENT>self._log_data(resp_data, True)<EOL>return resp_data, resp.status<EOL><DEDENT>except Exception as ex:<EOL><INDENT>if resp is not None:<EOL><INDENT>resp.close()<EOL><DEDENT>raise ex<EOL><DEDENT>finally:<EOL><INDENT>if resp is not None:<EOL><INDENT>await resp.release()<EOL><DEDENT><DEDENT>
Perform a POST request.