{"id":158258,"date":"2019-09-27T08:13:47","date_gmt":"2019-09-27T00:13:47","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=158258"},"modified":"2019-09-17T13:16:40","modified_gmt":"2019-09-17T05:16:40","slug":"powerful-httpie","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/powerful-httpie.html","title":{"rendered":"\u5f3a\u5927\u7684HTTPie"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nHTTPie \u662f\u4e00\u4e2a\u975e\u5e38\u6613\u7528\u3001\u6613\u4e8e\u5347\u7ea7\u7684 HTTP \u5ba2\u6237\u7aef\u3002\u5b83\u7684\u53d1\u97f3\u4e3a \u201caitch-tee-tee-pie\u201d \u5e76\u4ee5 http \u547d\u4ee4\u8fd0\u884c\uff0c\u5b83\u662f\u4e00\u4e2a\u7528 Python \u7f16\u5199\u7684\u6765\u7528\u4e8e\u8bbf\u95ee Web \u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u4f7f\u7528 HTTPie \u8c03\u8bd5 API\uff0c\u8fd9\u662f\u4e00\u4e2a\u7528 Python \u5199\u7684\u6613\u7528\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n

HTTPie \u662f\u4e00\u4e2a\u975e\u5e38\u6613\u7528\u3001\u6613\u4e8e\u5347\u7ea7\u7684 HTTP \u5ba2\u6237\u7aef\u3002\u5b83\u7684\u53d1\u97f3\u4e3a \u201caitch-tee-tee-pie\u201d \u5e76\u4ee5 http \u547d\u4ee4\u8fd0\u884c\uff0c\u5b83\u662f\u4e00\u4e2a\u7528 Python \u7f16\u5199\u7684\u6765\u7528\u4e8e\u8bbf\u95ee Web \u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n

\u7531\u4e8e\u8fd9\u662f\u4e00\u7bc7\u5173\u4e8e HTTP \u5ba2\u6237\u7aef\u7684\u6307\u5bfc\u6587\u7ae0\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u4e00\u4e2a HTTP \u670d\u52a1\u5668\u6765\u8bd5\u7528\u5b83\u3002\u5728\u8fd9\u91cc\uff0c\u8bbf\u95ee httpbin.org\uff0c\u5b83\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u5f00\u6e90 HTTP \u8bf7\u6c42\u548c\u54cd\u5e94\u670d\u52a1\u3002httpbin.org \u7f51\u7ad9\u662f\u4e00\u79cd\u6d4b\u8bd5 Web API \u7684\u5f3a\u5927\u65b9\u5f0f\uff0c\u5e76\u80fd\u4ed4\u7ec6\u7ba1\u7406\u5e76\u663e\u793a\u8bf7\u6c42\u548c\u54cd\u5e94\u5185\u5bb9\uff0c\u4e0d\u8fc7\u73b0\u5728\u8ba9\u6211\u4eec\u4e13\u6ce8\u4e8e HTTPie \u7684\u5f3a\u5927\u529f\u80fd\u3002<\/p>\n

Wget \u548c cURL \u7684\u66ff\u4ee3\u54c1<\/strong><\/div>\n

\u4f60\u53ef\u80fd\u542c\u8bf4\u8fc7\u53e4\u8001\u7684 Wget \u6216\u7a0d\u5fae\u65b0\u4e00\u4e9b\u7684 cURL \u5de5\u5177\uff0c\u5b83\u4eec\u5141\u8bb8\u4f60\u4ece\u547d\u4ee4\u884c\u8bbf\u95ee Web\u3002\u5b83\u4eec\u662f\u4e3a\u8bbf\u95ee\u7f51\u7ad9\u800c\u7f16\u5199\u7684\uff0c\u800c HTTPie \u5219\u7528\u4e8e\u8bbf\u95ee Web API\u3002<\/p>\n

\u7f51\u7ad9\u8bf7\u6c42\u53d1\u751f\u5728\u8ba1\u7b97\u673a\u548c\u6b63\u5728\u9605\u8bfb\u5e76\u54cd\u5e94\u5b83\u6240\u770b\u5230\u7684\u5185\u5bb9\u7684\u6700\u7ec8\u7528\u6237\u4e4b\u95f4\uff0c\u8fd9\u5e76\u4e0d\u592a\u4f9d\u8d56\u4e8e\u7ed3\u6784\u5316\u7684\u54cd\u5e94\u3002\u4f46\u662f\uff0cAPI \u8bf7\u6c42\u4f1a\u5728\u4e24\u53f0\u8ba1\u7b97\u673a\u4e4b\u95f4\u8fdb\u884c\u7ed3\u6784\u5316\u8c03\u7528\uff0c\u4eba\u5e76\u4e0d\u662f\u8be5\u6d41\u7a0b\u5185\u7684\u4e00\u90e8\u5206\uff0c\u50cf HTTPie \u8fd9\u6837\u7684\u547d\u4ee4\u884c\u5de5\u5177\u7684\u53c2\u6570\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n

\u5b89\u88c5 HTTPie<\/strong><\/div>\n

\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5b89\u88c5 HTTPie\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5b89\u88c5\uff0c\u65e0\u8bba\u4f60\u4f7f\u7528\u7684\u662f brew\u3001apt\u3001yum \u8fd8\u662f dnf\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u5df2\u914d\u7f6e virtualenvwrapper\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u7528\u81ea\u5df1\u7684\u65b9\u5f0f\u5b89\u88c5\uff1a<\/p>\n

$ mkvirtualenv httpie\r\n...\r\n(httpie) $ pip install httpie\r\n...\r\n(httpie) $ deactivate\r\n$ alias http=~\/.virtualenvs\/httpie\/bin\/http\r\n$ http -b GET https:\/\/httpbin.org\/get\r\n{\r\n    \"args\": {},\r\n    \"headers\": {\r\n        \"Accept\": \"*\/*\",\r\n        \"Accept-Encoding\": \"gzip, deflate\",\r\n        \"Host\": \"httpbin.org\",\r\n        \"User-Agent\": \"HTTPie\/1.0.2\"\r\n    },\r\n    \"origin\": \"104.220.242.210, 104.220.242.210\",\r\n    \"url\": \"https:\/\/httpbin.org\/get\"\r\n}\r\n<\/pre>\n

\u901a\u8fc7\u5c06 http \u522b\u540d\u6307\u5411\u4e3a\u865a\u62df\u73af\u5883\u4e2d\u7684\u547d\u4ee4\uff0c\u5373\u4f7f\u865a\u62df\u73af\u5883\u5728\u975e\u6d3b\u52a8\u72b6\u6001\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8fd0\u884c\u5b83\u3002\u4f60\u53ef\u4ee5\u5c06 alias \u547d\u4ee4\u653e\u5728 .bash_profile \u6216 .bashrc \u4e2d\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5347\u7ea7 HTTPie\uff1a<\/p>\n

$ ~\/.virtualenvs\/httpie\/bin\/pip install -U pip\r\n<\/pre>\n
\u4f7f\u7528 HTTPie \u67e5\u8be2\u7f51\u7ad9<\/strong><\/div>\n

HTTPie \u53ef\u4ee5\u7b80\u5316\u67e5\u8be2\u548c\u6d4b\u8bd5 API\u3002\u4e0a\u9762\u4f7f\u7528\u4e86\u4e00\u4e2a\u9009\u9879\uff0c-b\uff08\u5373 --body\uff09\u3002\u6ca1\u6709\u5b83\uff0cHTTPie \u5c06\u9ed8\u8ba4\u6253\u5370\u6574\u4e2a\u54cd\u5e94\uff0c\u5305\u62ec\u54cd\u5e94\u5934\uff1a<\/p>\n

$ http GET https:\/\/httpbin.org\/get\r\nHTTP\/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nConnection: keep-alive\r\nContent-Encoding: gzip\r\nContent-Length: 177\r\nContent-Type: application\/json\r\nDate: Fri, 09 Aug 2019 20:19:47 GMT\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\n \r\n{\r\n    \"args\": {},\r\n    \"headers\": {\r\n        \"Accept\": \"*\/*\",\r\n        \"Accept-Encoding\": \"gzip, deflate\",\r\n        \"Host\": \"httpbin.org\",\r\n        \"User-Agent\": \"HTTPie\/1.0.2\"\r\n    },\r\n    \"origin\": \"104.220.242.210, 104.220.242.210\",\r\n    \"url\": \"https:\/\/httpbin.org\/get\"\r\n}\r\n<\/pre>\n

\u8fd9\u5728\u8c03\u8bd5 API \u670d\u52a1\u65f6\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u5927\u91cf\u4fe1\u606f\u5728\u54cd\u5e94\u5934\u4e2d\u53d1\u9001\u3002\u4f8b\u5982\uff0c\u67e5\u770b\u53d1\u9001\u7684 cookie \u901a\u5e38\u5f88\u91cd\u8981\u3002httpbin.org \u63d0\u4f9b\u4e86\u901a\u8fc7 URL \u8def\u5f84\u8bbe\u7f6e cookie\uff08\u7528\u4e8e\u6d4b\u8bd5\u76ee\u7684\uff09\u7684\u65b9\u5f0f\u3002\u4ee5\u4e0b\u8bbe\u7f6e\u4e00\u4e2a\u6807\u9898\u4e3a opensource\uff0c \u503c\u4e3a awesome \u7684 cookie\uff1a<\/p>\n

$ http GET https:\/\/httpbin.org\/cookies\/set\/opensource\/awesome\r\nHTTP\/1.1 302 FOUND\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nConnection: keep-alive\r\nContent-Length: 223\r\nContent-Type: text\/html; charset=utf-8\r\nDate: Fri, 09 Aug 2019 20:22:39 GMT\r\nLocation: \/cookies\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nSet-Cookie: opensource=awesome; Path=\/\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\n \r\n\r\n\r\n< !DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 3.2 Final\/\/EN\">\r\n<title>Redirecting...<\/title>\r\n<h1>Redirecting...<\/h1>\r\n<p>You should be redirected automatically to target URL:\r\n<a href=\"\/cookies\">\/cookies<\/a>.  If not click the link.\r\n\r\n<\/pre>\n

\u6ce8\u610f Set-Cookie: opensource=awesome; Path=\/ \u7684\u54cd\u5e94\u5934\u3002\u8fd9\u8868\u660e\u4f60\u9884\u671f\u8bbe\u7f6e\u7684 cookie \u5df2\u6b63\u786e\u8bbe\u7f6e\uff0c\u8def\u5f84\u4e3a \/\u3002\u53e6\u8bf7\u6ce8\u610f\uff0c\u5373\u4f7f\u4f60\u5f97\u5230\u4e86 302 \u91cd\u5b9a\u5411\uff0chttp \u4e5f\u4e0d\u4f1a\u9075\u5faa\u5b83\u3002\u5982\u679c\u4f60\u60f3\u8981\u9075\u5faa\u91cd\u5b9a\u5411\uff0c\u5219\u9700\u8981\u660e\u786e\u4f7f\u7528 --follow \u6807\u5fd7\u8bf7\u6c42\uff1a<\/p>\n

$ http --follow GET https:\/\/httpbin.org\/cookies\/set\/opensource\/awesome\r\nHTTP\/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nConnection: keep-alive\r\nContent-Encoding: gzip\r\nContent-Length: 66\r\nContent-Type: application\/json\r\nDate: Sat, 10 Aug 2019 01:33:34 GMT\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\n \r\n{\r\n    \"cookies\": {\r\n        \"opensource\": \"awesome\"\r\n    }\r\n}\r\n<\/pre>\n

\u4f46\u6b64\u65f6\u4f60\u65e0\u6cd5\u770b\u5230\u539f\u6765\u7684 Set-Cookie \u5934\u3002\u4e3a\u4e86\u770b\u5230\u4e2d\u95f4\u54cd\u5e94\uff0c\u4f60\u9700\u8981\u4f7f\u7528 --all\uff1a<\/p>\n

$ http --headers --all --follow GET https:\/\/httpbin.org\/cookies\/set\/opensource\/awesome\r\nHTTP\/1.1 302 FOUND\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nContent-Type: text\/html; charset=utf-8\r\nDate: Sat, 10 Aug 2019 01:38:40 GMT\r\nLocation: \/cookies\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nSet-Cookie: opensource=awesome; Path=\/\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\nContent-Length: 223\r\nConnection: keep-alive\r\n \r\nHTTP\/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nContent-Encoding: gzip\r\nContent-Type: application\/json\r\nDate: Sat, 10 Aug 2019 01:38:41 GMT\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\nContent-Length: 66\r\nConnection: keep-alive\r\n<\/pre>\n

\u6253\u5370\u54cd\u5e94\u4f53\u5e76\u4e0d\u6709\u8da3\uff0c\u56e0\u4e3a\u4f60\u5927\u591a\u6570\u65f6\u5019\u53ea\u5173\u5fc3 cookie\u3002\u5982\u679c\u4f60\u60f3\u770b\u5230\u4e2d\u95f4\u8bf7\u6c42\u7684\u54cd\u5e94\u5934\uff0c\u800c\u4e0d\u662f\u6700\u7ec8\u8bf7\u6c42\u4e2d\u7684\u54cd\u5e94\u4f53\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n

$ http --print hb --history-print h --all --follow GET https:\/\/httpbin.org\/cookies\/set\/opensource\/awesome\r\nHTTP\/1.1 302 FOUND\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nContent-Type: text\/html; charset=utf-8\r\nDate: Sat, 10 Aug 2019 01:40:56 GMT\r\nLocation: \/cookies\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nSet-Cookie: opensource=awesome; Path=\/\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\nContent-Length: 223\r\nConnection: keep-alive\r\n \r\nHTTP\/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nContent-Encoding: gzip\r\nContent-Type: application\/json\r\nDate: Sat, 10 Aug 2019 01:40:56 GMT\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\nContent-Length: 66\r\nConnection: keep-alive\r\n \r\n{\r\n  \"cookies\": {\r\n    \"opensource\": \"awesome\"\r\n  }\r\n}\r\n<\/pre>\n

\u4f60\u53ef\u4ee5\u4f7f\u7528 --print \u7cbe\u786e\u63a7\u5236\u6253\u5370\u7684\u5185\u5bb9\uff08h\uff1a\u54cd\u5e94\u5934\uff1bb\uff1a\u54cd\u5e94\u4f53\uff09\uff0c\u5e76\u4f7f\u7528 --history-print \u8986\u76d6\u4e2d\u95f4\u8bf7\u6c42\u7684\u6253\u5370\u5185\u5bb9\u8bbe\u7f6e\u3002<\/p>\n

\u4f7f\u7528 HTTPie \u4e0b\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6<\/strong><\/div>\n

\u6709\u65f6\u54cd\u5e94\u4f53\u5e76\u4e0d\u662f\u6587\u672c\u5f62\u5f0f\uff0c\u5b83\u9700\u8981\u53d1\u9001\u5230\u53ef\u88ab\u4e0d\u540c\u5e94\u7528\u6253\u5f00\u7684\u6587\u4ef6\uff1a<\/p>\n

$ http GET https:\/\/httpbin.org\/image\/jpeg\r\nHTTP\/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nConnection: keep-alive\r\nContent-Length: 35588\r\nContent-Type: image\/jpeg\r\nDate: Fri, 09 Aug 2019 20:25:49 GMT\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\n \r\n+-----------------------------------------+\r\n| NOTE: binary data not shown in terminal |\r\n+-----------------------------------------+\r\n<\/pre>\n

\u8981\u5f97\u5230\u6b63\u786e\u7684\u56fe\u7247\uff0c\u4f60\u9700\u8981\u4fdd\u5b58\u5230\u6587\u4ef6\uff1a<\/p>\n

$ http --download GET https:\/\/httpbin.org\/image\/jpeg\r\nHTTP\/1.1 200 OK\r\nAccess-Control-Allow-Credentials: true\r\nAccess-Control-Allow-Origin: *\r\nConnection: keep-alive\r\nContent-Length: 35588\r\nContent-Type: image\/jpeg\r\nDate: Fri, 09 Aug 2019 20:28:13 GMT\r\nReferrer-Policy: no-referrer-when-downgrade\r\nServer: nginx\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: DENY\r\nX-XSS-Protection: 1; mode=block\r\n \r\nDownloading 34.75 kB to \"jpeg.jpe\"\r\nDone. 34.75 kB in 0.00068s (50.05 MB\/s)\r\n<\/pre>\n

\u8bd5\u4e00\u4e0b\uff01\u56fe\u7247\u5f88\u53ef\u7231\u3002<\/p>\n

\u4f7f\u7528 HTTPie \u53d1\u9001\u81ea\u5b9a\u4e49\u8bf7\u6c42<\/strong><\/div>\n

\u4f60\u53ef\u4ee5\u53d1\u9001\u6307\u5b9a\u7684\u8bf7\u6c42\u5934\u3002\u8fd9\u5bf9\u4e8e\u9700\u8981\u975e\u6807\u51c6\u5934\u7684\u81ea\u5b9a\u4e49 Web API \u5f88\u6709\u7528\uff1a<\/p>\n

$ http GET https:\/\/httpbin.org\/headers X-Open-Source-Com:Awesome\r\n{\r\n  \"headers\": {\r\n    \"Accept\": \"*\/*\",\r\n    \"Accept-Encoding\": \"gzip, deflate\",\r\n    \"Host\": \"httpbin.org\",\r\n    \"User-Agent\": \"HTTPie\/1.0.2\",\r\n    \"X-Open-Source-Com\": \"Awesome\"\r\n  }\r\n}\r\n<\/pre>\n

\u6700\u540e\uff0c\u5982\u679c\u8981\u53d1\u9001 JSON \u5b57\u6bb5\uff08\u5c3d\u7ba1\u53ef\u4ee5\u6307\u5b9a\u786e\u5207\u7684\u5185\u5bb9\uff09\uff0c\u5bf9\u4e8e\u8bb8\u591a\u5d4c\u5957\u8f83\u5c11\u7684\u8f93\u5165\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u65b9\u5f0f\uff1a<\/p>\n

$ http --body PUT https:\/\/httpbin.org\/anything open-source=awesome author=moshez\r\n{\r\n  \"args\": {},\r\n  \"data\": \"{\\\"open-source\\\": \\\"awesome\\\", \\\"author\\\": \\\"moshez\\\"}\",\r\n  \"files\": {},\r\n  \"form\": {},\r\n  \"headers\": {\r\n    \"Accept\": \"application\/json, *\/*\",\r\n    \"Accept-Encoding\": \"gzip, deflate\",\r\n    \"Content-Length\": \"46\",\r\n    \"Content-Type\": \"application\/json\",\r\n    \"Host\": \"httpbin.org\",\r\n    \"User-Agent\": \"HTTPie\/1.0.2\"\r\n  },\r\n  \"json\": {\r\n    \"author\": \"moshez\",\r\n    \"open-source\": \"awesome\"\r\n  },\r\n  \"method\": \"PUT\",\r\n  \"origin\": \"73.162.254.113, 73.162.254.113\",\r\n  \"url\": \"https:\/\/httpbin.org\/anything\"\r\n}\r\n<\/pre>\n

\u4e0b\u6b21\u5728\u8c03\u8bd5 Web API \u65f6\uff0c\u65e0\u8bba\u662f\u4f60\u81ea\u5df1\u7684\u8fd8\u662f\u522b\u4eba\u7684\uff0c\u8bb0\u5f97\u653e\u4e0b cURL\uff0c\u8bd5\u8bd5 HTTPie \u8fd9\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f7f\u7528 HTTPie \u8c03\u8bd5 API\uff0c\u8fd9\u662f\u4e00\u4e2a\u7528 Python \u5199\u7684\u6613\u7528\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002 HTTPie \u662f\u4e00\u4e2a\u975e\u5e38\u6613 […]<\/p>\n","protected":false},"author":1329,"featured_media":158259,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-158258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/158258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1329"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=158258"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/158258\/revisions"}],"predecessor-version":[{"id":158354,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/158258\/revisions\/158354"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/158259"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=158258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=158258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=158258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}