From ea07c7bfead2b9eb35f6a8a45af1d20ea65c2afc Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 27 Jan 2021 11:07:26 +0100 Subject: [PATCH] Merge pull request #3598 from overleaf/ae-put-json Add putJSON helper GitOrigin-RevId: 79d73ceb49836799b3215d9b10979da7cda982c4 --- services/web/frontend/js/infrastructure/fetch-json.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/web/frontend/js/infrastructure/fetch-json.js b/services/web/frontend/js/infrastructure/fetch-json.js index c6318cc26a..7c50da79f1 100644 --- a/services/web/frontend/js/infrastructure/fetch-json.js +++ b/services/web/frontend/js/infrastructure/fetch-json.js @@ -13,6 +13,10 @@ export function postJSON(path, options) { return fetchJSON(path, { ...options, method: 'POST' }) } +export function putJSON(path, options) { + return fetchJSON(path, { ...options, method: 'PUT' }) +} + export function deleteJSON(path, options) { return fetchJSON(path, { ...options, method: 'DELETE' }) }