async def post(self, cmd, data=None, timeout=None, **args):
        """Perform DAAP POST command with optional data."""
        def _post_request():
            headers = copy(_DMAP_HEADERS)
            headers['Content-Type'] = 'application/x-www-form-urlencoded'
            return self.http.post_data(
                self._mkurl(cmd, *args),
                data=data,
                headers=headers,
                timeout=timeout)

        await self._assure_logged_in()
        return await self._do(_post_request)
async def post ( self , cmd , data = None , timeout = None , ** args ) : def _post_request ( ) : headers = copy ( _DMAP_HEADERS ) headers [ 'Content-Type' ] = 'application/x-www-form-urlencoded' return self . http . post_data ( self . _mkurl ( cmd , * args ) , data = data , headers = headers , timeout = timeout ) await self . _assure_logged_in ( ) return await self . _do ( _post_request )
Perform DAAP POST command with optional data.