{"id":33686,"date":"2025-04-28T10:47:04","date_gmt":"2025-04-28T02:47:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/33686.html"},"modified":"2025-04-28T10:47:04","modified_gmt":"2025-04-28T02:47:04","slug":"%e3%80%90%e5%b7%a5%e4%bd%9c%e8%ae%b0%e5%bd%95%e3%80%91f12%e6%9f%a5%e7%9c%8b%e6%8e%a5%e5%8f%a3%e4%bf%a1%e6%81%af%e5%8f%8apostman%e4%b8%ad%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/33686.html","title":{"rendered":"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528"},"content":{"rendered":"<p>\u53ef\u53c2\u8003<\/p>\n<p>\u8be6\u7ec6\u6559\u7a0b&#xff1a;\u5982\u4f55\u4ece\u524d\u7aef\u67e5\u770b\u8c03\u7528\u63a5\u53e3\u3001\u4f20\u53c2\u53ca\u8fd4\u56de\u7ed3\u679c&#xff08;\u9644\u5e26\u56fe\u7247\u6848\u4f8b&#xff09;_f12\u67e5\u770b\u63a5\u53e3\u53ca\u53c2\u6570-CSDN\u535a\u5ba2<\/p>\n<h2>1\u3001\u63a5\u53e3\u4fe1\u606f<\/h2>\n<p>\u63a5\u53e3\u57fa\u7840\u77e5\u8bc62&#xff1a;http\u901a\u4fe1\u7684\u7ec4\u6210_\u63a5\u53e3\u8bf7\u6c42\u4fe1\u606f\u5305\u62ec-CSDN\u535a\u5ba2<\/p>\n<p>HTTP\u7c7b\u578b\u63a5\u53e3\u4e4b\u8bf7\u6c42&amp;\u54cd\u5e94\u8be6\u89e3 &#8211; \u4e09\u53d4\u6d4b\u8bd5\u7b14\u8bb0 &#8211; \u535a\u5ba2\u56ed<\/p>\n<h3 style=\"background-color:transparent\">1. HTTP\u8bf7\u6c42\u62a5\u6587<\/h3>\n<ul>\n<li>\n<p>\u6982\u5ff5&#xff1a;HTTP\u8bf7\u6c42\u62a5\u6587\u662f\u5ba2\u6237\u7aef\u5411\u670d\u52a1\u5668\u53d1\u9001\u7684\u8bf7\u6c42&#xff0c;\u7528\u4e8e\u83b7\u53d6\u8d44\u6e90\u6216\u63d0\u4ea4\u6570\u636e\u3002\u6839\u636e\u8bf7\u6c42\u65b9\u6cd5\u7684\u4e0d\u540c&#xff0c;\u8bf7\u6c42\u62a5\u6587\u7684\u7ed3\u6784\u548c\u5185\u5bb9\u4f1a\u6709\u6240\u53d8\u5316\u3002<\/p>\n<\/li>\n<li>\n<p>\u62a5\u6587\u7ed3\u6784&#xff1a;<\/p>\n<li>\n<p>\u8bf7\u6c42\u884c&#xff08;Request Line&#xff09;&#xff1a; \u2460 \u683c\u5f0f&#xff1a;&lt;\u65b9\u6cd5&gt; &lt;\u8bf7\u6c42\u76ee\u6807&gt; &lt;HTTP\u7248\u672c&gt; \u2461 \u793a\u4f8b&#xff1a;GET \/index.html HTTP\/1.1 \u2462 \u4f5c\u7528&#xff1a;&lt;\u65b9\u6cd5&gt;\u7528\u4e8e\u8868\u793a\u8bf7\u6c42\u7684\u7c7b\u578b&#xff08;\u5982GET, POST\u7b49&#xff09;&#xff1b;&lt;\u8bf7\u6c42\u76ee\u6807&gt;\u901a\u5e38\u662f\u8bf7\u6c42\u8d44\u6e90\u7684URL\u8def\u5f84&#xff1b;&lt;HTTP\u7248\u672c&gt;\u5982HTTP\/1.1&#xff0c;\u4e0d\u540c\u7248\u672c\u7684HTTP\u534f\u8bae\u5177\u6709\u4e0d\u540c\u7684\u7279\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bf7\u6c42\u5934&#xff08;Request Headers&#xff09;&#xff1a;\u8bf7\u6c42\u5934\u53ef\u5305\u542b\u591a\u4e2a\u5b57\u6bb5&#xff0c;\u5b57\u6bb5\u683c\u5f0f\u4e3a&#xff1a;&lt;\u5b57\u6bb5\u540d&gt;: &lt;\u5b57\u6bb5\u503c&gt;&#xff08;eg:Accept: text\/html&#xff09;&#xff1b;\u8bf7\u6c42\u5934\u7684\u4f5c\u7528\u662f\u63d0\u4f9b\u5ba2\u6237\u7aef\u4fe1\u606f\u548c\u8bf7\u6c42\u53c2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u7a7a\u884c&#xff08;Empty Line&#xff09;&#xff1a;\u5176\u4f5c\u7528\u662f\u5206\u9694\u8bf7\u6c42\u5934\u548c\u8bf7\u6c42\u4f53\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bf7\u6c42\u4f53&#xff08;Request Body&#xff09;&#xff1a;\u53ef\u9009&#xff0c;\u901a\u5e38\u7528\u4e8e POST\u3001PUT\u7b49\u8bf7\u6c42\u7c7b\u578b\u3002\u8bf7\u6c42\u4f53\u5305\u542b\u4e86\u63d0\u4ea4\u7684\u6570\u636e&#xff08;\u5982\u63d0\u4ea4\u7684\u8868\u5355\u6570\u636e&#xff09;\u3002<\/p>\n<\/li>\n<\/li>\n<li>\n<p>\u9996\u90e8\u884c\u5e38\u7528\u5b57\u6bb5&#xff1a;<\/p>\n<li>\n<p>Host&#xff1a;\u76ee\u6807\u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d\u3002<\/p>\n<\/li>\n<li>\n<p>User-Agent&#xff1a;\u5ba2\u6237\u7aef\u4fe1\u606f&#xff08;\u5982\u6d4f\u89c8\u5668\u7c7b\u578b&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Accept&#xff1a;\u5ba2\u6237\u7aef\u63a5\u53d7\u7684\u5a92\u4f53\u7c7b\u578b&#xff08;\u5982 text\/html&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Content-Type&#xff1a;\u8bf7\u6c42\u4f53\u7684\u5a92\u4f53\u7c7b\u578b&#xff08;\u5982 application\/json&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Content-Length&#xff1a;\u8bf7\u6c42\u4f53\u7684\u957f\u5ea6\u3002<\/p>\n<\/li>\n<\/li>\n<li>\n<p>GET\u8bf7\u6c42\u4e0ePOST\u8bf7\u6c42\u7684\u533a\u522b&#xff1a;<\/p>\n<li>\n<p>GET\u8bf7\u6c42&#xff1a;\u8bf7\u6c42\u4f53\u4e3a\u7a7a&#xff0c;\u6570\u636e\u76f4\u63a5\u901a\u8fc7URL\u4f20\u9012\u3002GET\u8bf7\u6c42\u7684\u7279\u70b9\u6709&#xff1a;\u2460\u6570\u636e\u957f\u5ea6\u6709\u9650&#xff08;\u53d7URL\u957f\u5ea6\u9650\u5236&#xff09;&#xff1b;\u2461\u6570\u636e\u53ef\u89c1&#xff08;\u5305\u542b\u5728URL\u4e2d&#xff09;&#xff0c;\u4e0d\u5b89\u5168&#xff1b;\u2462\u9002\u7528\u4e8e\u83b7\u53d6\u8d44\u6e90\u3002<\/p>\n<\/li>\n<li>\n<p>POST\u8bf7\u6c42&#xff1a;\u8bf7\u6c42\u4f53\u5305\u542b\u6570\u636e&#xff0c;\u6570\u636e\u901a\u8fc7\u8bf7\u6c42\u4f53&#xff08;\u8f7d\u8377&#xff09;\u4f20\u9012\u3002POST\u8bf7\u6c42\u7684\u7279\u70b9\u6709&#xff1a;\u2460\u6570\u636e\u957f\u5ea6\u7406\u8bba\u4e0a\u65e0\u9650\u5236&#xff1b;\u2461\u6570\u636e\u4e0d\u53ef\u89c1&#xff08;\u5c01\u88c5\u5728\u8bf7\u6c42\u4f53\u4e2d&#xff09;&#xff0c;\u76f8\u6bd4GET\u8bf7\u6c42\u66f4\u5b89\u5168&#xff1b;\u2462\u9002\u7528\u4e8e\u63d0\u4ea4\u6570\u636e&#xff08;\u4f8b\u5982\u63d0\u4ea4\u8868\u5355\u6570\u636e&#xff09;\u3002<\/p>\n<\/li>\n<\/li>\n<\/ul>\n<h3>2. HTTP\u54cd\u5e94\u62a5\u6587<\/h3>\n<ul>\n<li>\n<p>\u6982\u5ff5&#xff1a;HTTP\u54cd\u5e94\u62a5\u6587\u662f\u670d\u52a1\u5668\u5bf9\u5ba2\u6237\u7aef\u8bf7\u6c42\u7684\u54cd\u5e94&#xff0c;\u8fd4\u56de\u8bf7\u6c42\u7ed3\u679c\u3002\u5176\u7ed3\u6784\u5305\u62ec\u72b6\u6001\u884c\u3001\u54cd\u5e94\u5934\u548c\u54cd\u5e94\u4f53\u3002<\/p>\n<\/li>\n<li>\n<p>\u62a5\u6587\u7ed3\u6784&#xff1a;<\/p>\n<li>\n<p>\u72b6\u6001\u884c&#xff08;Status Line&#xff09;&#xff1a; \u2460 \u683c\u5f0f&#xff1a;&lt;HTTP\u7248\u672c&gt; &lt;\u72b6\u6001\u7801&gt; &lt;\u72b6\u6001\u77ed\u8bed&gt; \u2461 \u793a\u4f8b&#xff1a;HTTP\/1.1 200 OK \u2462 \u4f5c\u7528&#xff1a;&lt;HTTP\u7248\u672c&gt;\u5982HTTP\/2&#xff0c;\u4e0d\u540c\u7248\u672c\u7684HTTP\u534f\u8bae\u5177\u6709\u4e0d\u540c\u7684\u7279\u6027&#xff1b;&lt;\u72b6\u6001\u7801&gt;\u8868\u793a\u8bf7\u6c42\u7684\u7ed3\u679c&#xff08;\u5982 200\u3001404&#xff09;&#xff1b;&lt;\u72b6\u6001\u77ed\u8bed&gt;\u5219\u662f\u5bf9\u72b6\u6001\u7801\u7684\u7b80\u8981\u63cf\u8ff0&#xff08;\u5982 OK\u3001Not Found&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u54cd\u5e94\u5934&#xff08;Response Headers&#xff09;&#xff1a;\u54cd\u5e94\u5934\u53ef\u5305\u542b\u591a\u4e2a\u5b57\u6bb5&#xff0c;\u5b57\u6bb5\u683c\u5f0f\u4e3a&#xff1a;&lt;\u5b57\u6bb5\u540d&gt;: &lt;\u5b57\u6bb5\u503c&gt;&#xff08;eg: Content-Type: text\/html&#xff09;&#xff1b;\u8bf7\u6c42\u5934\u7684\u4f5c\u7528\u662f\u63d0\u4f9b\u5ba2\u6237\u7aef\u4fe1\u606f\u548c\u8bf7\u6c42\u53c2\u6570&#xff1b;\u54cd\u5e94\u5934\u7684\u4f5c\u7528\u662f\u63d0\u4f9b\u670d\u52a1\u5668\u4fe1\u606f\u548c\u54cd\u5e94\u53c2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u7a7a\u884c&#xff08;Empty Line&#xff09;&#xff1a;\u5176\u4f5c\u7528\u662f\u5206\u9694\u54cd\u5e94\u5934\u548c\u54cd\u5e94\u4f53\u3002<\/p>\n<\/li>\n<li>\n<p>\u54cd\u5e94\u4f53&#xff08;Response Body&#xff09;&#xff1a;\u53ef\u9009&#xff0c;\u5305\u542b\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e&#xff0c;\u4e5f\u53ef\u80fd\u6ca1\u6709\u8fd4\u56de&#xff0c;\u6bd4\u5982304\u3002<\/p>\n<\/li>\n<\/li>\n<li>\n<p>\u9996\u90e8\u884c\u5e38\u7528\u5b57\u6bb5&#xff1a;<\/p>\n<li>\n<p>Content-Type&#xff1a;\u54cd\u5e94\u4f53\u7684\u5a92\u4f53\u7c7b\u578b&#xff08;\u5982 text\/html&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Content-Length&#xff1a;\u54cd\u5e94\u4f53\u7684\u957f\u5ea6&#xff08;\u5982 1024\u5b57\u8282&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Set-Cookie&#xff1a;\u670d\u52a1\u5668\u8bbe\u7f6e\u7684Cookie\u3002<\/p>\n<\/li>\n<li>\n<p>Cache-Control&#xff1a;\u7f13\u5b58\u63a7\u5236\u6307\u4ee4\u3002<\/p>\n<\/li>\n<\/li>\n<li>\n<p>\u5e38\u89c1\u72b6\u6001\u7801<\/p>\n<li>\n<p>200 OK&#xff1a;\u8bf7\u6c42\u6210\u529f\u3002<\/p>\n<\/li>\n<li>\n<p>404 Not Found&#xff1a;\u8bf7\u6c42\u7684\u8d44\u6e90\u672a\u627e\u5230\u3002<\/p>\n<\/li>\n<li>\n<p>500 Internal Server Error&#xff1a;\u670d\u52a1\u5668\u5185\u90e8\u9519\u8bef\u3002<\/p>\n<\/li>\n<\/li>\n<\/ul>\n<h3 style=\"background-color:transparent\"><\/h3>\n<h2>2\u3001\u6d4f\u89c8\u5668F12\u67e5\u770b<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"758\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024700-680eec24d04ef.png\" width=\"802\" \/><\/p>\n<h3>1. Headers\u6807\u5934<\/h3>\n<p>\u5305\u542b<span style=\"color:#fe2c24\">\u8bf7\u6c42\u5934<\/span>\u548c\u54cd\u5e94\u5934\u4fe1\u606f&#xff0c;\u5982&#xff1a;<\/p>\n<p><span style=\"color:#fe2c24\">Content-Type&#xff1a;\u6307\u5b9a\u8bf7\u6c42\u6216\u54cd\u5e94\u7684\u5185\u5bb9\u7c7b\u578b<\/span>&#xff08;\u5982application\/json&#xff09;\u3002<\/p>\n<p>Authorization&#xff1a;\u7528\u4e8e\u8eab\u4efd\u9a8c\u8bc1\u7684\u4ee4\u724c\u6216\u51ed\u636e\u3002<\/p>\n<p>Cookie&#xff1a;\u5b58\u50a8\u5728\u5ba2\u6237\u7aef\u7684\u4f1a\u8bdd\u4fe1\u606f\u3002<\/p>\n<p>User-Agent&#xff1a;\u6807\u8bc6\u53d1\u9001\u8bf7\u6c42\u7684\u6d4f\u89c8\u5668\u6216\u5ba2\u6237\u7aef\u3002<\/p>\n<h3>2. Payload\u8d1f\u8f7d\u00a0<\/h3>\n<p>\u663e\u793a\u8bf7\u6c42\u4f53\u7684\u5185\u5bb9&#xff0c;\u5373\u524d\u7aef\u4f20\u9012\u7ed9\u540e\u7aef\u7684\u53c2\u6570\u3002\u5bf9\u4e8e\u4e0d\u540c\u7c7b\u578b\u7684\u8bf7\u6c42&#xff0c;Payload\u5185\u5bb9\u6709\u6240\u4e0d\u540c&#xff1a;<\/p>\n<p>POST\/PUT \u8bf7\u6c42&#xff1a;\u901a\u5e38\u4e3aJSON\u683c\u5f0f\u7684\u6570\u636e&#xff0c;\u4f8b\u5982&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"727\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024701-680eec252ab28.png\" width=\"717\" \/><\/p>\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"101\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024701-680eec25640a8.png\" width=\"524\" \/><\/p>\n<h3>3. Preview\u9884\u89c8<\/h3>\n<p>\u66f4\u53cb\u597d\u7684\u683c\u5f0f\u5c55\u793a\u8fd4\u56de\u6570\u636e&#xff0c;\u4fbf\u4e8e\u9605\u8bfb\u3002\u5bf9\u4e8e\u590d\u6742\u7684\u5d4c\u5957\u7ed3\u6784&#xff0c;Preview \u4f1a\u81ea\u52a8\u683c\u5f0f\u5316\u5e76\u63d0\u4f9b\u6298\u53e0\u529f\u80fd<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"328\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024701-680eec25906c8.png\" width=\"713\" \/><\/p>\n<h3>4. Response\u54cd\u5e94<\/h3>\n<p>\u663e\u793a\u540e\u7aef\u8fd4\u56de\u7684\u6570\u636e&#xff0c;\u901a\u5e38\u4e3aJSON\u683c\u5f0f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"918\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024701-680eec25c0f4a.png\" width=\"1751\" \/><\/p>\n<h2>3\u3001\u6d4f\u89c8\u5668\u67e5\u770b\u540e&#xff0c;\u4f7f\u7528postman\u6d4b\u8bd5\u63a5\u53e3\u00a0<\/h2>\n<h3>1&#xff1a;\u5728\u6d4f\u89c8\u5668\u4e2d\u6355\u83b7\u8bf7\u6c42<\/h3>\n<p> 1. \u6253\u5f00\u6d4f\u89c8\u5668\u5f00\u53d1\u8005\u5de5\u5177&#xff1a; \u00a0 \u00a0&#8211; \u6309 &#096;F12&#096; \u6216\u53f3\u952e\u9875\u9762\u9009\u62e9 **\u68c0\u67e5&#xff08;Inspect&#xff09;**\u3002 2. \u5207\u6362\u5230 **Network&#xff08;\u7f51\u7edc&#xff09;** \u9009\u9879\u5361\u3002 3. \u89e6\u53d1\u9700\u8981\u5206\u6790\u7684POST\u8bf7\u6c42&#xff08;\u5982\u63d0\u4ea4\u8868\u5355\u3001\u70b9\u51fb\u6309\u94ae\u7b49&#xff09;\u3002 4. \u5728\u8bf7\u6c42\u5217\u8868\u4e2d&#xff1a; \u00a0 \u00a0&#8211; \u8fc7\u6ee4\u8bf7\u6c42\u7c7b\u578b\u4e3a **XHR** \u6216 **Fetch**&#xff08;\u901a\u5e38POST\u8bf7\u6c42\u5728\u6b64\u5206\u7c7b&#xff09;\u3002 \u00a0 \u00a0&#8211; \u627e\u5230\u76ee\u6807POST\u8bf7\u6c42&#xff0c;\u70b9\u51fb\u67e5\u770b\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<h3 style=\"background-color:transparent\">2&#xff1a;\u590d\u5236\u5173\u952e\u4fe1\u606f<\/h3>\n<p> 1. \u590d\u5236\u8bf7\u6c42URL &#8211; \u5728\u8bf7\u6c42\u8be6\u60c5\u9875\u7684 **Headers** \u9009\u9879\u5361\u4e2d&#xff0c;\u627e\u5230 **Request URL**&#xff0c;\u53f3\u952e\u590d\u5236\u5b8c\u6574URL\u3002<\/p>\n<p>2. \u590d\u5236\u8bf7\u6c42\u5934&#xff08;Headers&#xff09; &#8211; \u5728 **Headers** \u9009\u9879\u5361\u7684 **Request Headers** \u533a\u57df&#xff1a; \u00a0 &#8211; \u590d\u5236\u5173\u952e\u5934\u4fe1\u606f&#xff0c;\u5982&#xff1a; \u00a0 \u00a0 &#096;&#096;&#096;http \u00a0 \u00a0 Content-Type: application\/json \u00a0# \u6216\u5176\u4ed6\u7c7b\u578b&#xff08;\u5982\u8868\u5355&#xff09; \u00a0 \u00a0 Authorization: Bearer xxxxxx \u00a0 \u00a0# \u8ba4\u8bc1\u4fe1\u606f&#xff08;\u5982\u6709&#xff09; \u00a0 \u00a0 User-Agent: &#8230;<\/p>\n<p>3. \u590d\u5236\u8d1f\u8f7d\u53c2\u6570&#xff08;Payload&#xff09; &#8211; \u5207\u6362\u5230 **Payload** \u6216 **Request** \u9009\u9879\u5361&#xff08;\u4e0d\u540c\u6d4f\u89c8\u5668\u53ef\u80fd\u540d\u79f0\u4e0d\u540c&#xff09;&#xff1a; \u00a0 &#8211; \u67e5\u770b **Request Payload** \u6216 **Form Data**&#xff0c;\u590d\u5236\u5b8c\u6574\u7684\u53c2\u6570&#xff08;\u53ef\u80fd\u662fJSON\u3001\u8868\u5355\u952e\u503c\u5bf9\u7b49\u683c\u5f0f&#xff09;\u3002<\/p>\n<h3 style=\"background-color:transparent\">3&#xff1a;\u5728Postman\u4e2d\u914d\u7f6e\u8bf7\u6c42<\/h3>\n<p> 1. \u521b\u5efa\u65b0\u8bf7\u6c42** 1. \u6253\u5f00Postman&#xff0c;\u70b9\u51fb **&#043; New** \u521b\u5efa\u65b0\u8bf7\u6c42\u3002 2. \u8bbe\u7f6e\u8bf7\u6c42\u65b9\u6cd5\u4e3a **POST**\u3002 3. \u7c98\u8d34\u590d\u5236\u7684 **Request URL** \u5230\u5730\u5740\u680f\u3002<\/p>\n<p>2. \u6dfb\u52a0\u8bf7\u6c42\u5934&#xff08;Headers&#xff09;** 1. \u5207\u6362\u5230 **Headers** \u9009\u9879\u5361\u3002 2. \u6dfb\u52a0\u590d\u5236\u7684\u8bf7\u6c42\u5934&#xff08;\u5982 &#096;Content-Type&#096;, &#096;Authorization&#096; \u7b49&#xff09;\u3002<\/p>\n<p>3. \u8bbe\u7f6e\u8bf7\u6c42\u4f53&#xff08;Body&#xff09;** 1. \u5207\u6362\u5230 **Body** \u9009\u9879\u5361\u3002 2. \u6839\u636e\u8bf7\u6c42\u5934\u4e2d\u7684 &#096;Content-Type&#096; \u9009\u62e9\u5bf9\u5e94\u683c\u5f0f&#xff1a; \u00a0 \u00a0&#8211; **JSON \u6570\u636e**&#xff1a;\u9009\u62e9 &#096;raw&#096; \u2192 \u53f3\u4fa7\u4e0b\u62c9\u83dc\u5355\u9009 **JSON** \u2192 \u7c98\u8d34JSON\u53c2\u6570\u3002 \u00a0 \u00a0 \u00a0&#096;&#096;&#096;json \u00a0 \u00a0 \u00a0{ \u00a0 \u00a0 \u00a0 \u00a0&#034;username&#034;: &#034;test&#034;, \u00a0 \u00a0 \u00a0 \u00a0&#034;password&#034;: &#034;123456&#034; \u00a0 \u00a0 \u00a0} \u00a0 \u00a0 \u00a0&#096;&#096;&#096; \u00a0 \u00a0&#8211; **\u8868\u5355\u6570\u636e**&#xff1a;\u9009\u62e9 &#096;x-www-form-urlencoded&#096; \u2192 \u586b\u5199\u952e\u503c\u5bf9\u3002 \u00a0 \u00a0 \u00a0&#096;&#096;&#096; \u00a0 \u00a0 \u00a0key: username, value: test \u00a0 \u00a0 \u00a0key: password, value: 123456 \u00a0 \u00a0 \u00a0&#096;&#096;&#096; \u00a0 \u00a0&#8211; **FormData\/\u6587\u4ef6\u4e0a\u4f20**&#xff1a;\u9009\u62e9 &#096;form-data&#096; \u2192 \u6dfb\u52a0\u952e\u503c\u6216\u6587\u4ef6\u3002<\/p>\n<h3 style=\"background-color:transparent\">\u00a04&#xff1a;\u53c2\u6570\u683c\u5f0f\u4e3aform-data<\/h3>\n<p>Content-Type: multipart\/form-data;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"823\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024702-680eec269a5d9.png\" width=\"877\" \/><\/p>\n<h3 style=\"background-color:transparent\">5&#xff1a;\u53c2\u6570\u683c\u5f0f\u4e3ajson<\/h3>\n<p>content-type:application\/json<\/p>\n<p>\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"849\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024702-680eec26f217b.png\" width=\"901\" \/><\/p>\n<\/p>\n<h3 style=\"background-color:transparent\">6&#xff1a;\u53d1\u9001\u8bf7\u6c42\u5e76\u9a8c\u8bc1<\/h3>\n<p> 1. \u70b9\u51fb **Send** \u53d1\u9001\u8bf7\u6c42\u3002 2. \u68c0\u67e5 **Response** \u533a\u57df\u7684\u72b6\u6001\u7801\u548c\u8fd4\u56de\u6570\u636e&#xff0c;\u786e\u8ba4\u662f\u5426\u4e0e\u6d4f\u89c8\u5668\u7ed3\u679c\u4e00\u81f4\u3002<\/p>\n<\/p>\n<p>### **\u5e38\u89c1\u95ee\u9898\u5904\u7406** 1. **\u8ba4\u8bc1\u5931\u8d25**&#xff1a; \u00a0 \u00a0&#8211; \u68c0\u67e5 &#096;Authorization&#096; \u5934\u662f\u5426\u6709\u6548&#xff08;\u5982Token\u662f\u5426\u8fc7\u671f&#xff09;\u3002 2. **\u53c2\u6570\u683c\u5f0f\u9519\u8bef**&#xff1a; \u00a0 \u00a0&#8211; \u786e\u4fdd &#096;Content-Type&#096; \u548c\u8bf7\u6c42\u4f53\u683c\u5f0f\u5339\u914d&#xff08;\u5982JSON\u9700\u7528\u53cc\u5f15\u53f7&#xff09;\u3002 3. **\u8de8\u57df\u95ee\u9898&#xff08;CORS&#xff09;**&#xff1a; \u00a0 \u00a0&#8211; \u5728Postman\u8bbe\u7f6e\u4e2d\u5173\u95ed\u8de8\u57df\u9650\u5236&#xff08;Postman\u9ed8\u8ba4\u7ed5\u8fc7CORS&#xff09;\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2k\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u53ef\u53c2\u8003\u3002_\u6d4f\u89c8\u5668f12\u600e\u4e48\u770bnginx\u4fe1\u606f<\/p>\n","protected":false},"author":2,"featured_media":33679,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[137],"topic":[],"class_list":["post-33686","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-137"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/33686.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2k\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u53ef\u53c2\u8003\u3002_\u6d4f\u89c8\u5668f12\u600e\u4e48\u770bnginx\u4fe1\u606f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/33686.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-28T02:47:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024700-680eec24d04ef.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33686.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/33686.html\",\"name\":\"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-28T02:47:04+00:00\",\"dateModified\":\"2025-04-28T02:47:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/33686.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/33686.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33686.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/33686.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2k\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u53ef\u53c2\u8003\u3002_\u6d4f\u89c8\u5668f12\u600e\u4e48\u770bnginx\u4fe1\u606f","og_url":"https:\/\/www.wsisp.com\/helps\/33686.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-28T02:47:04+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250428024700-680eec24d04ef.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/33686.html","url":"https:\/\/www.wsisp.com\/helps\/33686.html","name":"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-28T02:47:04+00:00","dateModified":"2025-04-28T02:47:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/33686.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/33686.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/33686.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u5de5\u4f5c\u8bb0\u5f55\u3011F12\u67e5\u770b\u63a5\u53e3\u4fe1\u606f\u53capostman\u4e2d\u4f7f\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=33686"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33686\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/33679"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=33686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=33686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=33686"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=33686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}