{"id":1398,"date":"2023-05-08T21:12:33","date_gmt":"2023-05-08T13:12:33","guid":{"rendered":"https:\/\/sanlangcode.com\/?p=1398"},"modified":"2023-05-08T21:12:33","modified_gmt":"2023-05-08T13:12:33","slug":"http%e6%8e%a5%e5%8f%a3%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/sanlangcode.com\/index.php\/2023\/05\/08\/http%e6%8e%a5%e5%8f%a3%e8%87%aa%e5%8a%a8%e5%8c%96%e6%b5%8b%e8%af%95\/","title":{"rendered":"HTTP\u63a5\u53e3\u81ea\u52a8\u5316\u6d4b\u8bd5"},"content":{"rendered":"\n<p>HTTP\u7b80\u4ecb<\/p>\n\n\n\n<p>\u5728TCP\/IP\u4e2d\uff0cHTTP\u5c5e\u4e8e\u4f20\u8f93\u5c42\u534f\u8bae\u3002HTTP\u91c7\u7528\u201c\u8bf7\u6c42\u2014\u5e94\u7b54\u201d\u6a21\u5f0f\uff0c\u5e76\u4e14\u8be5\u534f\u8bae\u662f\u65e0\u72b6\u6001\u7684\uff0c\u5373\u540e\u7eed\u7684\u5904\u7406\u5982\u679c\u9700\u8981\u7528\u5230\u524d\u9762\u7684\u4fe1\u606f\uff0c\u5219\u5fc5\u987b\u91cd\u4f20\u3002HTTP\u901a\u8fc7SSL\/TLS\u52a0\u5bc6\u6210\u4e3aHTTPS\uff0c\u4e0eHTTP\u76f8\u6bd4\uff0cHTTPS\u7684\u5b89\u5168\u6027\u66f4\u597d\uff0c\u4f46\u4f20\u8f93\u901f\u5ea6\u4e0d\u53caHTTP\u3002HTTP\u4e2d\u6709\u591a\u79cd\u8bf7\u6c42\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>1\uff0eGET\u65b9\u6cd5GET\u65b9\u6cd5\u7528\u4e8e\u83b7\u53d6\u6307\u5b9a\u8d44\u6e90\uff0c\u53ef\u7406\u89e3\u4e3a\u201c\u8bfb\u53d6\u201d\u8d44\u6e90\u3002\u5728GET\u65b9\u6cd5\u7684URL\u4e2d\u53ef\u4ee5\u643a\u5e26\u53c2\u6570\uff0c\u643a\u5e26\u53c2\u6570\u7684\u683c\u5f0f\u4e3a\u201ckey1=value1&amp;key2=value2&amp;key3=value3\u201d\u3002<\/p>\n\n\n\n<p>2\uff0eHEAD\u65b9\u6cd5\u4e0eGET\u65b9\u6cd5\u4e00\u6837\uff0cHEAD\u65b9\u6cd5\u4e5f\u7528\u4e8e\u83b7\u53d6\u6307\u5b9a\u8d44\u6e90\uff0c\u533a\u522b\u5728\u4e8e\uff0cHEAD\u65b9\u6cd5\u7684\u54cd\u5e94\u62a5\u6587\u6ca1\u6709\u6d88\u606f\u4f53\u3002<\/p>\n\n\n\n<p>3\uff0ePOST\u65b9\u6cd5POST\u65b9\u6cd5\u7528\u4e8e\u521b\u5efa\u6216\u4fee\u6539\u6307\u5b9a\u8d44\u6e90\uff0c\u6bd4\u5982\u5e38\u89c1\u7684\u63d0\u4ea4\u8868\u5355\u6216\u4e0a\u4f20\u6587\u4ef6\u7b49\u3002POST\u65b9\u6cd5\u65e2\u53ef\u4ee5\u5728URL\u4e2d\u643a\u5e26\u53c2\u6570\uff0c\u4e5f\u53ef\u4ee5\u5728\u8bf7\u6c42\u4f53\u4e2d\u643a\u5e26\u53c2\u6570\u3002POST\u65b9\u6cd5\u548cGET\u65b9\u6cd5\u662f\u6700\u5e38\u7528\u7684\u4e24\u79cdHTTP\u8bf7\u6c42\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>4\uff0ePUT\u65b9\u6cd5\u4e0ePOST\u65b9\u6cd5\u4e00\u6837\uff0cPUT\u65b9\u6cd5\u4e5f\u7528\u4e8e\u521b\u5efa\u6216\u4fee\u6539\u6307\u5b9a\u8d44\u6e90\uff0c\u533a\u522b\u5728\u4e8e\uff0cPUT\u65b9\u6cd5\u662f\u5e42\u7b49\u7684\uff0c\u5373\u8c03\u7528\u4e00\u6b21\u4e0e\u8c03\u7528\u591a\u6b21\u7684\u6548\u679c\u4e00\u6837\uff1b\u800cPOST\u65b9\u6cd5\u662f\u975e\u5e42\u7b49\u7684\uff0c\u5373\u8c03\u7528\u591a\u6b21\u6548\u679c\u53ef\u80fd\u6709\u5dee\u5f02\u3002<\/p>\n\n\n\n<p>5\uff0eDELETE\u65b9\u6cd5DELETE\u65b9\u6cd5\u7528\u4e8e\u8bf7\u6c42\u670d\u52a1\u5668\u5220\u9664\u6307\u5b9a\u7684\u8d44\u6e90\u3002<\/p>\n\n\n\n<p>6\uff0eTRACE\u65b9\u6cd5TRACE\u65b9\u6cd5\u4e3b\u8981\u7528\u4e8e\u8c03\u8bd5\u6216\u6d4b\u8bd5\uff0c\u662f\u5bf9\u670d\u52a1\u5668\u7684\u4e00\u79cd\u8fde\u901a\u6027\u6d4b\u8bd5\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>7\uff0eOPTIONS\u65b9\u6cd5OPTIONS\u65b9\u6cd5\u4e00\u822c\u7528\u4e8e\u68c0\u6d4b\u670d\u52a1\u5668\u652f\u6301\u7684\u8bf7\u6c42\u65b9\u6cd5\uff0c\u54cd\u5e94\u62a5\u6587\u4e2d\u5305\u542b\u4e00\u4e2a\u540d\u4e3aAllow\u7684\u54cd\u5e94\u5934\u5b57\u6bb5\uff0c\u8be5\u5b57\u6bb5\u7684\u503c\u8868\u793a\u4e86\u670d\u52a1\u5668\u652f\u6301\u7684HTTP\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>8\uff0eCONNECT\u65b9\u6cd5CONNECT\u65b9\u6cd5\u4e00\u822c\u7528\u4e8e\u4ee3\u7406\u670d\u52a1\u5668\u3002\u6bd4\u5982\uff0c\u670d\u52a1\u5668\u4f7f\u7528HTTPS\u8fdb\u884c\u6570\u636e\u4f20\u8f93\uff0c\u4e14\u6d4f\u89c8\u5668\u9700\u8981\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u90a3\u4e48\u6d4f\u89c8\u5668\u9996\u5148\u4f7f\u7528CONNECT\u65b9\u6cd5\u4ee5\u660e\u6587\u65b9\u5f0f\u5411\u4ee3\u7406\u670d\u52a1\u5668\u53d1\u9001\u76ee\u6807\u670d\u52a1\u5668\u7684IP\u5730\u5740\u548c\u7aef\u53e3\uff0c\u5728\u4ee3\u7406\u670d\u52a1\u5668\u4e0e\u76ee\u6807\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u540e\u518d\u8fdb\u884c\u540e\u7eed\u7684\u6570\u636e\u4f20\u8f93\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\u4ee3\u7406\u670d\u52a1\u5668\u4e0d\u4f1a\u7834\u574fHTTPS\u4f20\u8f93\u8fc7\u7a0b\u7684\u5b89\u5168\u6027\u3002\u5728\u5ba2\u6237\u7aef\u53d1\u8d77HTTP\u8bf7\u6c42\u540e\u670d\u52a1\u5668\u4f1a\u8fdb\u884c\u54cd\u5e94\uff0c\u4e0d\u540c\u7684\u54cd\u5e94\u7801\u5bf9\u5e94\u4e0d\u540c\u7684\u573a\u666f\u3002<\/p>\n\n\n\n<p>\u54cd\u5e94\u7801\u75313\u4f4d\u6570\u5b57\u7ec4\u6210\uff0c\u7b2c\u4e00\u4e2a\u6570\u5b57\u4ee3\u8868\u5f53\u524d\u54cd\u5e94\u7684\u7c7b\u578b\u3002<\/p>\n\n\n\n<p>1XX\u2014\u2014\u63d0\u793a\u4fe1\u606f\uff0c\u670d\u52a1\u5668\u7684\u4e34\u65f6\u54cd\u5e94\uff0c\u6b64\u65f6\u5ba2\u6237\u7aef\u5e94\u7ee7\u7eed\u53d1\u8d77\u8bf7\u6c42\u3002<\/p>\n\n\n\n<p>2XX\u2014\u2014\u6210\u529f\uff0c\u8bf7\u6c42\u5df2\u88ab\u670d\u52a1\u5668\u6210\u529f\u5904\u7406\uff0c\u6bd4\u5982200 OK\u3002<\/p>\n\n\n\n<p>3XX\u2014\u2014\u91cd\u5b9a\u5411\uff0c\u9700\u8981\u5ba2\u6237\u7aef\u8fdb\u884c\u540e\u7eed\u64cd\u4f5c\u624d\u80fd\u8fbe\u6210\u76ee\u7684\uff0c\u6bd4\u5982302 Found\u3002<\/p>\n\n\n\n<p>4XX\u2014\u2014\u5ba2\u6237\u7aef\u9519\u8bef\uff0c\u5ba2\u6237\u7aef\u8bf7\u6c42\u53d1\u751f\u9519\u8bef\uff0c\u6bd4\u5982404Not Found\u3002<\/p>\n\n\n\n<p>5XX\u2014\u2014\u670d\u52a1\u5668\u9519\u8bef\uff0c\u670d\u52a1\u5668\u5904\u7406\u6b63\u786e\u8bf7\u6c42\u65f6\u53d1\u751f\u9519\u8bef\uff0c\u6bd4\u5982500 Internal Server Error\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTTP\u7b80\u4ecb \u5728TCP\/IP\u4e2d\uff0c&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1398","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/comments?post=1398"}],"version-history":[{"count":0,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1398\/revisions"}],"wp:attachment":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media?parent=1398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/categories?post=1398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/tags?post=1398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}