Zitat von aschwith
Beitrag anzeigen
Aber, der POST Request wurde erweitert:
ALT:
Code:
try: response = self._session.post(url, data=soap_data, timeout=self._timeout, headers=headers, auth=HTTPDigestAuth(self._fritz_device.get_user(), self._fritz_device.get_password()), verify=self._verify) # self.logger.debug(response.content) xml = minidom.parseString(response.content) except Exception as e: if self._fritz_device.is_available(): self.logger.error("Exception when sending POST request. method _update_host: %s" % str(e)) self.set_device_availability(False) return
Code:
try: response = self._session.post(url, data=data, timeout=self._timeout, headers=headers, auth=HTTPDigestAuth(self._fritz_device.get_user(), self._fritz_device.get_password()), verify=self._verify) except Exception as e: self.logger.error(f'Exception while sending POST request: {e}') if self._fritz_device.is_available(): self.set_device_availability(False) return else: try: response.raise_for_status() except requests.exceptions.HTTPError as e: self.logger.error(f"POST request error: {e}") self.set_device_availability(False) if response.status_code == 200: if self.logger.isEnabledFor(logging.DEBUG): self.logger.debug("Sending POST request successful") if not self._fritz_device.is_available(): self.set_device_availability(True) return response
Kann das etwas zu den User und Passwort zum Einloggen in der FB zu tun haben?
Kommentar