ソースを参照

Merge pull request #3598 from overleaf/ae-put-json

Add putJSON helper

GitOrigin-RevId: 79d73ceb49836799b3215d9b10979da7cda982c4
Miguel Serrano 5 年 前
親
コミット
ea07c7bfea
1 ファイル変更、4 行追加、0 行削除
  1. 4 0
      services/web/frontend/js/infrastructure/fetch-json.js

+ 4 - 0
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' })
 }