Added XML RSS as Content-Type (#62822)

This commit is contained in:
Kristján Bjarni 2021-12-27 09:49:38 +00:00 committed by GitHub
parent a17fffbfc2
commit 38723b277e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,6 +144,7 @@ class RestSensor(RestEntity, SensorEntity):
content_type.startswith("text/xml") content_type.startswith("text/xml")
or content_type.startswith("application/xml") or content_type.startswith("application/xml")
or content_type.startswith("application/xhtml+xml") or content_type.startswith("application/xhtml+xml")
or content_type.startswith("application/rss+xml")
): ):
try: try:
value = json.dumps(xmltodict.parse(value)) value = json.dumps(xmltodict.parse(value))