{"id":184887,"date":"2023-07-16T16:05:19","date_gmt":"2023-07-16T08:05:19","guid":{"rendered":"http:\/\/www.idc.net\/help\/184887\/"},"modified":"2023-07-16T16:05:19","modified_gmt":"2023-07-16T08:05:19","slug":"%e5%90%8e%e6%b5%aa%e4%ba%91%e5%b0%8f%e7%a8%8b%e5%ba%8f%e6%95%99%e7%a8%8b%ef%bc%9a%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%b7%a5%e5%85%b7-http%e8%b0%83%e7%94%a8","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/184887\/","title":{"rendered":"\u540e\u6d6a\u4e91\u5c0f\u7a0b\u5e8f\u6559\u7a0b\uff1a\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5de5\u5177 HTTP\u8c03\u7528"},"content":{"rendered":"<p>\u5f00\u53d1\u8005\u5de5\u5177\u63d0\u4f9b\u4e86\u547d\u4ee4\u884c\u4e0e HTTP \u670d\u52a1\u4e24\u79cd\u63a5\u53e3\u4f9b\u5916\u90e8\u8c03\u7528\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216 HTTP \u8bf7\u6c42\u6307\u793a\u5de5\u5177\u8fdb\u884c\u767b\u5f55\u3001\u9884\u89c8\u3001\u4e0a\u4f20\u7b49\u64cd\u4f5c\u3002<\/p>\n<h2>HTTP<\/h2>\n<p>http \u670d\u52a1\u5728\u5de5\u5177\u542f\u52a8\u540e\u81ea\u52a8\u5f00\u542f\uff0cHTTP \u670d\u52a1\u7aef\u53e3\u53f7\u5728\u7528\u6237\u76ee\u5f55\u4e0b\u8bb0\u5f55\uff0c\u53ef\u901a\u8fc7\u68c0\u67e5\u7528\u6237\u76ee\u5f55\u3001\u68c0\u67e5\u7528\u6237\u76ee\u5f55\u4e0b\u662f\u5426\u6709\u7aef\u53e3\u6587\u4ef6\u53ca\u5c1d\u8bd5\u8fde\u63a5\u6765\u5224\u65ad\u5de5\u5177\u662f\u5426\u5b89\u88c5\/\u542f\u52a8\u3002<\/p>\n<p>\u7aef\u53e3\u53f7\u6587\u4ef6\u4f4d\u7f6e\uff1a<\/p>\n<p>macOS :&nbsp;~\/Library\/Application Support\/\u5fae\u4fe1web\u5f00\u53d1\u8005\u5de5\u5177\/Default\/.ide<\/p>\n<p>Windows :&nbsp;~\/AppData\/Local\/\u5fae\u4fe1web\u5f00\u53d1\u8005\u5de5\u5177\/User Data\/Default\/.ide<\/p>\n<h3>1. \u6253\u5f00\u5de5\u5177\u6216\u6307\u5b9a\u9879\u76ee<\/h3>\n<p>\u63a5\u53e3\u5b9a\u4e49\uff1a<\/p>\n<p>URL\uff1a \/open<\/p>\n<p>HTTP \u65b9\u6cd5: GET<\/p>\n<table>\n<thead>\n<tr>\n<th>URL \u53c2\u6570<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>projectpath<\/td>\n<td>\u5426<\/td>\n<td>\u6253\u5f00\u6307\u5b9a\u8def\u5f84\u4e2d\u7684\u9879\u76ee\u3002\u5982\u9879\u76ee\u5df2\u6253\u5f00\uff0c\u81ea\u52a8\u5237\u65b0\u9879\u76ee\u3002\u5982\u9879\u76ee\u672a\u521b\u5efa\uff0c\u81ea\u52a8\u521b\u5efa\u5e76\u6253\u5f00\u9879\u76ee<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code># \u6253\u5f00\u5de5\u5177\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/open\n# \u6253\u5f00\/\u5237\u65b0\u9879\u76ee\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/open?projectpath=\u9879\u76ee\u5168\u8def\u5f84\n<\/code><\/pre>\n<p>\u6ce8\u610f\uff1a<\/p>\n<ul>\n<li>\u9879\u76ee\u8def\u5f84\u4e2d\u5fc5\u987b\u542b\u6b63\u786e\u683c\u5f0f\u7684 project.config.json \u4e14\u5176\u4e2d\u6709 appid \u548c projectname \u5b57\u6bb5\u3002<\/li>\n<li>\u9879\u76ee\u8def\u5f84\u9700\u7ecf URL encode<\/li>\n<\/ul>\n<h3>2. \u767b\u5f55<\/h3>\n<p>\u63a5\u53e3\u5b9a\u4e49\uff1a<\/p>\n<p>URL\uff1a\/login<\/p>\n<p>HTTP \u65b9\u6cd5\uff1aGET<\/p>\n<table>\n<thead>\n<tr>\n<th>URL \u53c2\u6570<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>format<\/td>\n<td>\u5426<\/td>\n<td>\u6307\u5b9a\u767b\u5f55\u4e8c\u7ef4\u7801\u8fd4\u56de\u683c\u5f0f\uff0c\u53ef\u9009\u503c\u6709 image\u3001base64\u3001terminal\uff0c\u9ed8\u8ba4 image\u3002\u56fe\u7247\u683c\u5f0f\u4e3a png<\/td>\n<\/tr>\n<tr>\n<td>qroutput<\/td>\n<td>\u5426<\/td>\n<td>\u6307\u5b9a\u6587\u4ef6\u8def\u5f84\uff0c\u5728\u6587\u4ef6\u5199\u5165\u4e8c\u7ef4\u7801\u6570\u636e\u3002\u5982\u6307\u5b9a\uff0c\u4e8c\u7ef4\u7801\u5c06\u88ab\u5199\u5165\u6307\u5b9a\u8def\u5f84\u7684\u6587\u4ef6\u5185\uff0c\u5982\u672a\u6307\u5b9a\uff0c\u4e8c\u7ef4\u7801\u5c06\u4f5c\u4e3a\u8bf7\u6c42\u76f8\u5e94\u4f53\u8fd4\u56de<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code># \u767b\u5f55\uff0c\u8fd4\u56de\u56fe\u7247\u683c\u5f0f\u7684\u4e8c\u7ef4\u7801\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/login\n# \u767b\u5f55\uff0c\u53d6 base64 \u683c\u5f0f\u4e8c\u7ef4\u7801\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/login?format=base64\n# \u767b\u5f55\uff0c\u53d6 base64 \u683c\u5f0f\u4e8c\u7ef4\u7801\uff0c\u5e76\u5199\u5165 \/Users\/username\/logincode.txt\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/login?format=base64&qroutput=%2FUsers%2Fusername%2Flogincode.txt\n<\/code><\/pre>\n<h3>3. \u9884\u89c8<\/h3>\n<p>\u63a5\u53e3\u5b9a\u4e49\uff1a<\/p>\n<p>URL\uff1a\/preview<\/p>\n<p>HTTP \u65b9\u6cd5\uff1aGET<\/p>\n<table>\n<thead>\n<tr>\n<th>URL \u53c2\u6570<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>projectpath<\/td>\n<td>\u662f<\/td>\n<td>\u9884\u89c8\u6307\u5b9a\u8def\u5f84\u4e2d\u7684\u9879\u76ee\u3002\u5982\u9879\u76ee\u5df2\u6253\u5f00\uff0c\u81ea\u52a8\u5237\u65b0\u9879\u76ee\u3002\u5982\u9879\u76ee\u672a\u521b\u5efa\uff0c\u81ea\u52a8\u521b\u5efa\u5e76\u9884\u89c8\u9879\u76ee<\/td>\n<\/tr>\n<tr>\n<td>format<\/td>\n<td>\u5426<\/td>\n<td>\u6307\u5b9a\u767b\u5f55\u4e8c\u7ef4\u7801\u8fd4\u56de\u683c\u5f0f\uff0c\u53ef\u9009\u503c\u6709 image\u3001base64\u3001terminal\uff0c\u9ed8\u8ba4 image\u3002\u56fe\u7247\u683c\u5f0f\u4e3a png<\/td>\n<\/tr>\n<tr>\n<td>qroutput<\/td>\n<td>\u5426<\/td>\n<td>\u6307\u5b9a\u6587\u4ef6\u8def\u5f84\uff0c\u5728\u6587\u4ef6\u4e2d\u5199\u5165\u4e8c\u7ef4\u7801\u6570\u636e\u3002\u5982\u6307\u5b9a\uff0c\u4e8c\u7ef4\u7801\u5c06\u88ab\u5199\u5165\u6307\u5b9a\u8def\u5f84\u7684\u6587\u4ef6\u5185\uff0c\u5982\u672a\u6307\u5b9a\uff0c\u4e8c\u7ef4\u7801\u5c06\u4f5c\u4e3a\u8bf7\u6c42\u76f8\u5e94\u4f53\u8fd4\u56de<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code># \u9884\u89c8\u8def\u5f84\u4e3a \/Users\/username\/demo \u7684\u9879\u76ee\uff0c\u8fd4\u56de\u56fe\u7247\u683c\u5f0f\u7684\u4e8c\u7ef4\u7801\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/preview?projectpath=%2FUsers%2Fusername%2Fdemo\n# \u9884\u89c8\u8def\u5f84\u4e3a \/Users\/username\/demo \u7684\u9879\u76ee\uff0c\u8fd4\u56de base64 \u683c\u5f0f\u7684\u4e8c\u7ef4\u7801\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/preview?projectpath=%2FUsers%2Fusername%2Fdemo&format=base64\n# \u9884\u89c8\u8def\u5f84\u4e3a \/Users\/username\/demo \u7684\u9879\u76ee\uff0c\u8fd4\u56de base64 \u683c\u5f0f\u7684\u4e8c\u7ef4\u7801\uff0c\u5e76\u5199\u5165 \/Users\/username\/logincode.txt\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/preview?projectpath=%2FUsers%2Fusername%2Fdemo&format=base64&qroutput=%2FUsers%2Fusername%2Flogincode.txt\n<\/code><\/pre>\n<h3>4. \u4e0a\u4f20<\/h3>\n<p>\u63a5\u53e3\u5b9a\u4e49\uff1a<\/p>\n<p>URL\uff1a\/upload<\/p>\n<p>HTTP \u65b9\u6cd5\uff1aGET<\/p>\n<table>\n<thead>\n<tr>\n<th>URL \u53c2\u6570<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>projectpath<\/td>\n<td>\u662f<\/td>\n<td>\u4e0a\u4f20\u6307\u5b9a\u8def\u5f84\u4e2d\u7684\u9879\u76ee<\/td>\n<\/tr>\n<tr>\n<td>version<\/td>\n<td>\u662f<\/td>\n<td>\u7248\u672c\u53f7<\/td>\n<\/tr>\n<tr>\n<td>desc<\/td>\n<td>\u5426<\/td>\n<td>\u672c\u6b21\u4e0a\u4f20\u7684\u7248\u672c\u5907\u6ce8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code># \u4e0a\u4f20\u8def\u5f84\u4e3a \/Users\/username\/demo \u7684\u9879\u76ee\uff0c\u6307\u5b9a\u7248\u672c\u53f7\u4e3a v1.0.0\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/upload?projectpath=%2FUsers%2Fusername%2Fdemo&version=v1.0.0\n# \u4e0a\u4f20\u8def\u5f84\u4e3a \/Users\/username\/demo \u7684\u9879\u76ee\uff0c\u6307\u5b9a\u7248\u672c\u53f7\u4e3a v1.0.0\uff0c\u5e76\u5e26\u4e0a\u5907\u6ce8\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/upload?projectpath=%2FUsers%2Fusername%2Fdemo&version=v1.0.0&desc=test\n<\/code><\/pre>\n<h3>5. \u81ea\u52a8\u5316\u6d4b\u8bd5<\/h3>\n<p>\u63a5\u53e3\u5b9a\u4e49\uff1a<\/p>\n<p>URL\uff1a\/test<\/p>\n<p>HTTP \u65b9\u6cd5\uff1aGET<\/p>\n<table>\n<thead>\n<tr>\n<th>URL \u53c2\u6570<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>projectpath<\/td>\n<td>\u662f<\/td>\n<td>\u6d4b\u8bd5\u6307\u5b9a\u8def\u5f84\u4e2d\u7684\u9879\u76ee<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code># \u63d0\u4ea4\u8def\u5f84\u4e3a \/Users\/username\/demo \u7684\u9879\u76ee\u8fdb\u884c\u6d4b\u8bd5\nhttp:\/\/127.0.0.1:\u7aef\u53e3\u53f7\/test?projectpath=%2FUsers%2Fusername%2Fdemo\n<\/code><\/pre>\n<h3>\u8bf7\u6c42\u54cd\u5e94<\/h3>\n<p>\u6b63\u5e38\u60c5\u51b5\u4e0b HTTP \u76f8\u5e94\u72b6\u6001\u7801\u4e3a 200\uff0c\u9519\u8bef\u65f6 400\uff0c\u8fd4\u56de\u5982\u4e0b\u683c\u5f0f\u7684 JSON \u5b57\u7b26\u4e32\uff1a<\/p>\n<pre><code>{\n  \"code\": 40000,\n  \"error\": \"\u539f\u56e0\"\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u53d1\u8005\u5de5\u5177\u63d0\u4f9b\u4e86\u547d\u4ee4\u884c\u4e0e HTTP \u670d\u52a1\u4e24\u79cd\u63a5\u53e3\u4f9b\u5916\u90e8\u8c03\u7528\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216 HTTP \u8bf7\u6c42\u6307\u793a\u5de5\u5177\u8fdb\u884c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182398],"tags":[],"class_list":["post-184887","post","type-post","status-publish","format-standard","hentry","category-mini-program"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/184887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=184887"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/184887\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=184887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=184887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=184887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}