def post(self, method, params=None):
        payload = {"method": method}
        if params:
            payload['params'] = params
        try:
            response = requests.post(self.api_url,
                                     json=payload,
                                     auth=self.auth,
                                     headers=self.headers,
                                     timeout=30)
            response.raise_for_status()
            return response.json()
        except requests.exceptions.ConnectionError as conn_exc:
            _LOGGER.error("Failed to update nzbget status from %s.  Error: %s",
                          self.api_url, conn_exc)
            raise
Send a post request, and return the response as a dict.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/sensor/nzbget.py/NZBGetAPI.post