{"id":158,"date":"2023-06-21T15:26:14","date_gmt":"2023-06-21T07:26:14","guid":{"rendered":"https:\/\/blessingcr.com\/?p=158"},"modified":"2023-06-21T15:28:22","modified_gmt":"2023-06-21T07:28:22","slug":"%e5%85%b3%e4%ba%8erestful-%e8%a7%84%e8%8c%83","status":"publish","type":"post","link":"https:\/\/blessingcr.com\/?p=158","title":{"rendered":"\u5173\u4e8eRESTful \u89c4\u8303"},"content":{"rendered":"<h2>RESTful \u89c4\u8303<\/h2>\n<h4>\u4e3a\u4ec0\u4e48\u9075\u5faaRESTful \u89c4\u8303<\/h4>\n<p>\u5f53\u591a\u4eba\u8d1f\u8d23\u4e00\u4e2a\u6a21\u5757\u65f6\u5019<br \/>\n\u9700\u6c42\uff1a<br \/>\n\u73b0\u5728\u8981\u4fee\u6539\u6587\u4ef6\u7684\u57fa\u672c\u4fe1\u606f\uff08\u5168\u90e8\u4fee\u6539\uff09\uff0c\u4fee\u6539\u6587\u4ef6\u7684\u57fa\u672c\u4fe1\u606f\uff08\u53ea\u4fee\u6539\u63d0\u4ea4\u7684\u5c5e\u6027\uff09\uff0c\u4fee\u6539\u6587\u4ef6\u7684\u5143\u4fe1\u606f\uff08\u5168\u90e8\u4fee\u6539\uff09\uff0c\u4fee\u6539\u6587\u4ef6\u7684\u5143\u4fe1\u606f\uff08\u53ea\u4fee\u6539\u63d0\u4ea4\u7684\u5c5e\u6027\uff09<br \/>\n\u4e0d\u9075\u5faaRESTful\u89c4\u8303\u5199\u6cd5:<br \/>\n\u65b9\u6cd5A<br \/>\npost \/bi-file\/baseFile\/updateAll {....}<br \/>\npost \/bi-file\/baseFile\/updateSome {....}<br \/>\npost \/bi-file\/mataFile\/updateAll {....}<br \/>\npost \/bi-file\/mataFile\/updateSome {....}<br \/>\n\u65b9\u6cd5B<br \/>\npost \/bi-file\/baseFile\/updateAll {....}<br \/>\npost \/bi-file\/baseFile\/updateAny {....}<br \/>\npost \/bi-file\/mataFile\/updateAll {....}<br \/>\npost \/bi-file\/mataFile\/updateAny {....}<br \/>\n\u65b9\u6cd5C<br \/>\npost \/bi-file\/baseFile\/update {....}<br \/>\npost \/bi-file\/baseFile\/updateAny {....}<br \/>\npost \/bi-file\/mataFile\/update {....}<br \/>\npost \/bi-file\/mataFile\/updateAny {....}<br \/>\n\u65b9\u6cd5D<br \/>\npost \/bi-file\/baseFile\/updateAll {....}<br \/>\npost \/bi-file\/baseFile\/update {....}<br \/>\npost \/bi-file\/mataFile\/updateAll {....}<br \/>\npost \/bi-file\/mataFile\/update {....}<br \/>\n\u4e0d\u9075\u5faa\u89c4\u8303\u7684\u8bdd\u4e0a\u9762\u8fd9\u6837\u5199\u90fd\u662f\u53ef\u4ee5\u7684, N\u4e2a\u4eba\u8d1f\u8d23\u8fd9\u4e2a\u6a21\u5757\u5c31\u6709N\u79cd\u5199\u6cd5<\/p>\n<p>RESTful\u7684\u8bdd\uff0c\u5c31\u4e0b\u9762\u4e00\u79cd<br \/>\nput \/bi-file\/baseFile {....}<br \/>\npatch \/bi-file\/baseFile {....}<br \/>\nput \/bi-file\/mataFile {....}<br \/>\npatch \/bi-file\/mataFilee {....}<\/p>\n<h4><strong>\u4e3a\u4ec0\u4e48\u4e0d\u4e25\u683c\u9075\u5faaRESTful\u89c4\u8303<\/strong><\/h4>\n<p>1. \u4e3b\u8981\u8fd8\u662f\u56e0\u4e3a\u5f88\u591a\u65f6\u5019\u5f88\u591a\u52a8\u8bcd\u96be\u4ee5\u8868\u8fbe\uff0c\u6bd4\u5982login\uff0c\u5f88\u96be\u6620\u5c04\u6210\u67d0\u79cd\u8d44\u6e90\uff0c\u4e0d\u8981\u4e3a\u4e86RESTful\u800cRESTful<br \/>\n2. \u6309\u7167RESTful\u89c4\u8303\uff0c\u4e0d\u5efa\u8baeDELETE \u5e26body\uff0c\u6709\u65f6\u4e00\u4e9b\u7cfb\u7edf\u548c\u7ec4\u4ef6\u4e5f\u4e0d\u652f\u6301Patch\uff0c\u6bd4\u5982AWS Linux\uff0c\u6240\u4ee5\u6709\u65f6\u56e0\u4e3a\u5404\u79cd\u73af\u5883\u539f\u56e0\u662f\u4e0d\u4e25\u683c\u9075\u5faa\u7684\uff0c\u6bd4\u5982\u73b0\u5728Delete\u5c31\u5e26\u4e86body<br \/>\n3. \u5728\u4e00\u4e9b\u590d\u6742\u67e5\u8be2\u7684\u65f6\u5019\uff0c\u6bd4\u5982\u67e5\u8be2\u591a\u4e2aid\uff0c\u6216\u8005\u5e74\u9f84\u5927\u4e8e5\uff0c\u8fd9\u65f6\u5019\u6309\u7167\u89c4\u8303\uff0c\u9700\u8981\u5148 post \/xx\/queries {\u6761\u4ef61\uff0c\u6761\u4ef62\uff0c\u6761\u4ef63} \u521b\u9020\u4e00\u4e2a\u67e5\u8be2\uff0c\u7136\u540e\u7528 get \/xxx\/i=id \u7528\u521a\u624d\u8fd4\u56de\u7684\u67e5\u8be2id\u67e5\u8be2\uff0c\u4f46\u662f\u5b9e\u9645\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u671f\u671b\u76f4\u63a5\u8fd4\u56de\uff0c\u6240\u4ee5\u8fd9\u4e5f\u4e0d\u9075\u5faa\u89c4\u8303\uff08\u4f7f\u7528post\u67e5\u8be2\uff0c\u4e0d\u8981\u7528get id=1,2,3,4&amp;age='5'&amp;type=.. \u8fd9\u79cd\u65b9\u5f0f\uff0c \u8fd9\u79cd\u7eaf\u7cb9\u4e3a\u4e86RESTful\u800cRESTful\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RESTful \u89c4\u8303 \u4e3a\u4ec0\u4e48\u9075\u5faaRESTful \u89c4\u8303 \u5f53\u591a\u4eba\u8d1f\u8d23\u4e00\u4e2a\u6a21\u5757\u65f6\u5019 \u9700\u6c42\uff1a \u73b0\u5728\u8981\u4fee\u6539\u6587\u4ef6\u7684\u57fa\u672c\u4fe1\u606f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[49],"class_list":["post-158","post","type-post","status-publish","format-standard","hentry","category-19","tag-49"],"_links":{"self":[{"href":"https:\/\/blessingcr.com\/index.php?rest_route=\/wp\/v2\/posts\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blessingcr.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blessingcr.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blessingcr.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blessingcr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=158"}],"version-history":[{"count":3,"href":"https:\/\/blessingcr.com\/index.php?rest_route=\/wp\/v2\/posts\/158\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/blessingcr.com\/index.php?rest_route=\/wp\/v2\/posts\/158\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/blessingcr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blessingcr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blessingcr.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}