From b4c9f0df9eceaafad7ad380ffbd5dd7c89956d95 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 3 Aug 2022 17:41:07 +0530 Subject: [PATCH] UI: Change POST to PUT in /api/agent-configuration requests --- .../components/configuration-components/ImportConfigModal.tsx | 2 +- .../monkey_island/cc/ui/src/components/pages/ConfigurePage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx b/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx index c36f58911..2c7014f2b 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/ImportConfigModal.tsx @@ -97,7 +97,7 @@ const ConfigImportModal = (props: Props) => { delete config['advanced']; authComponent.authFetch(configImportEndpoint, { - method: 'POST', + method: 'PUT', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(config) } diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js index c7561eb4b..473554da9 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ConfigurePage.js @@ -276,7 +276,7 @@ class ConfigurePageComponent extends AuthComponent { return ( this.authFetch(CONFIG_URL, { - method: 'POST', + method: 'PUT', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(config) })