From 4cb6bdd9cf4ea5e532ecb751a89e6b8959627d14 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 5 Aug 2022 09:20:52 -0400 Subject: [PATCH] BB: Add put_json() --- .../blackbox/island_client/monkey_island_requests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/envs/monkey_zoo/blackbox/island_client/monkey_island_requests.py b/envs/monkey_zoo/blackbox/island_client/monkey_island_requests.py index 7b91207a2..ebf808a87 100644 --- a/envs/monkey_zoo/blackbox/island_client/monkey_island_requests.py +++ b/envs/monkey_zoo/blackbox/island_client/monkey_island_requests.py @@ -88,6 +88,12 @@ class MonkeyIslandRequests(object): self.addr + url, data=data, headers=self.get_jwt_header(), verify=False ) + @_Decorators.refresh_jwt_token + def put_json(self, url, json: Dict): + return requests.put( # noqa: DUO123 + self.addr + url, json=json, headers=self.get_jwt_header(), verify=False + ) + @_Decorators.refresh_jwt_token def post_json(self, url, json: Dict): return requests.post( # noqa: DUO123