0225138 4 months ago
parent
commit
7f0aed64e8
2 changed files with 62 additions and 0 deletions
  1. 61 0
      src/server/REST.js
  2. 1 0
      tsconfig.json

+ 61 - 0
src/server/REST.js

@@ -0,0 +1,61 @@
+//查找
+fetch("http://web2023.fmode.cn:9999/parse/classes/Dyp?", {
+    "headers": {
+      "accept": "*/*",
+      "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+      "x-parse-application-id": "dev"
+    },
+    "referrer": "http://127.0.0.1:4040/",
+    "referrerPolicy": "strict-origin-when-cross-origin",
+    "body": null,
+    "method": "GET",
+    "mode": "cors",
+    "credentials": "omit"
+  });
+
+  //增加
+  fetch("http://web2023.fmode.cn:9999/parse/classes/Dyp", {
+    "headers": {
+      "accept": "*/*",
+      "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+      "content-type": "text/plain;charset=UTF-8",
+      "x-parse-application-id": "dev"
+    },
+    "referrer": "http://127.0.0.1:4040/",
+    "referrerPolicy": "strict-origin-when-cross-origin",
+    "body": '{name:小张,ID:33333}',
+    "method": "POST",
+    "mode": "cors",
+    "credentials": "omit"
+  });
+
+  //Put 修改
+  fetch("http://web2023.fmode.cn:9999/parse/classes/Dyp/eaFgYxb9bS", {
+    "headers": {
+      "accept": "*/*",
+      "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+      "content-type": "text/plain;charset=UTF-8",
+      "x-parse-application-id": "dev"
+    },
+    "referrer": "http://127.0.0.1:4040/",
+    "referrerPolicy": "strict-origin-when-cross-origin",
+    "body": "{\"password\":\"123\"}",
+    "method": "PUT",
+    "mode": "cors",
+    "credentials": "omit"
+  });
+
+  //delete 删除
+  fetch("http://web2023.fmode.cn:9999/parse/classes/Dyp/LnrVMFVYgH", {
+    "headers": {
+      "accept": "*/*",
+      "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+      "x-parse-application-id": "dev"
+    },
+    "referrer": "http://127.0.0.1:4040/",
+    "referrerPolicy": "strict-origin-when-cross-origin",
+    "body": null,
+    "method": "DELETE",
+    "mode": "cors",
+    "credentials": "omit"
+  });

+ 1 - 0
tsconfig.json

@@ -24,6 +24,7 @@
     ],
     "useDefineForClassFields": false
   },
+  
   "angularCompilerOptions": {
     "enableI18nLegacyMessageIdFormat": false,
     "strictInjectionParameters": true,