From 9c09fd6076101d00d0b11be5a0038ef6c3117fb1 Mon Sep 17 00:00:00 2001 From: Alexander Karl Date: Thu, 21 Apr 2022 17:23:03 +0200 Subject: [PATCH] Use the Accept Header to indicate that the response should be json --- plugins/inventory/nb_inventory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/inventory/nb_inventory.py b/plugins/inventory/nb_inventory.py index 67e8c4c8f..9c5d03ae3 100644 --- a/plugins/inventory/nb_inventory.py +++ b/plugins/inventory/nb_inventory.py @@ -1866,6 +1866,7 @@ def parse(self, inventory, loader, path, cache=True): "User-Agent": "ansible %s Python %s" % (ansible_version, python_version.split(" ", maxsplit=1)[0]), "Content-type": "application/json", + "Accept": "application/json", } self.cert = self.get_option("cert") self.key = self.get_option("key")