{"id":23284,"date":"2025-04-19T07:21:18","date_gmt":"2025-04-18T23:21:18","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/23284.html"},"modified":"2025-04-19T07:21:18","modified_gmt":"2025-04-18T23:21:18","slug":"c-%e8%b7%a8%e5%b9%b3%e5%8f%b0%e8%bd%bb%e9%87%8f%e7%ba%a7%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%a1%86%e6%9e%b6httplib","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/23284.html","title":{"rendered":"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib"},"content":{"rendered":"<h3>C&#043;&#043; \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib<\/h3>\n<p>\u4e00.\u57fa\u7840\u4ecb\u7ecd \u5173\u4e8eC&#043;&#043;\u7684httplib\u5e93&#xff0c;\u5b83\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u3001\u8f7b\u91cf\u7ea7\u7684HTTP\u5ba2\u6237\u7aef\/\u670d\u52a1\u5668\u5e93&#xff0c;\u9002\u7528\u4e8eLinux\u548cWindows\u5e73\u53f0\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5173\u952e\u4fe1\u606f&#xff1a;<\/p>\n<li>\n<p>\u7b80\u4ecb&#xff1a;<\/p>\n<ul>\n<li>cpp-httplib \u662f\u4e00\u4e2aC&#043;&#043;\u7f16\u5199\u7684\u5f00\u6e90HTTP\u5e93&#xff0c;\u5b83\u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684\u63a5\u53e3&#xff0c;\u4f7f\u5f00\u53d1\u8005\u80fd\u591f\u8f7b\u677e\u5730\u6784\u5efa\u57fa\u4e8eHTTP\u534f\u8bae\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li>\u5b83\u662f\u4e00\u4e2a\u591a\u7ebf\u7a0b\u201c\u963b\u585e\u201dHTTP\u5e93&#xff0c;\u4f7f\u7528\u8d77\u6765\u975e\u5e38\u65b9\u4fbf&#xff0c;\u53ea\u9700\u8981\u5305\u542b\u5934\u6587\u4ef6httplib.h\u5373\u53ef\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7279\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u8f7b\u91cf\u7ea7&#xff1a;\u4ec5\u4f9d\u8d56\u4e8eC&#043;&#043;\u6807\u51c6\u5e93&#xff0c;\u65e0\u9700\u5b89\u88c5\u989d\u5916\u7684\u4f9d\u8d56\u9879\u3002<\/li>\n<li>\u7b80\u5355\u6613\u7528\u7684\u63a5\u53e3&#xff1a;\u63d0\u4f9b\u4e86\u7b80\u5355\u76f4\u89c2\u7684\u63a5\u53e3&#xff0c;\u65b9\u4fbf\u5904\u7406HTTP\u8bf7\u6c42\u548c\u54cd\u5e94\u3002<\/li>\n<li>\u5ba2\u6237\u7aef\u529f\u80fd&#xff1a;\u53ef\u4ee5\u7528\u4f5cHTTP\u5ba2\u6237\u7aef&#xff0c;\u53d1\u9001HTTP\u8bf7\u6c42\u5e76\u63a5\u6536\u54cd\u5e94\u3002<\/li>\n<li>SSL\/TLS\u652f\u6301&#xff1a;\u652f\u6301\u901a\u8fc7SSL\/TLS\u8fdb\u884c\u5b89\u5168\u7684HTTP\u901a\u4fe1\u3002<\/li>\n<li>\u9759\u6001\u6587\u4ef6\u670d\u52a1\u5668&#xff1a;\u63d0\u4f9b\u4e86\u9759\u6001\u6587\u4ef6\u670d\u52a1\u5668\u7684\u529f\u80fd\u3002<\/li>\n<li>\u8de8\u5e73\u53f0\u652f\u6301&#xff1a;\u53ef\u5728\u591a\u4e2a\u5e73\u53f0\u4e0a\u8fd0\u884c&#xff0c;\u5305\u62ecWindows\u3001Linux\u548cmacOS\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u4f7f\u7528&#xff1a;<\/p>\n<ul>\n<li>\u7f16\u8bd1\u65f6\u9700\u8981\u94fe\u63a5pthread\u5e93&#xff0c;\u4f8b\u5982\u4f7f\u7528g&#043;&#043;\u7f16\u8bd1\u5668&#xff1a;g&#043;&#043; -o server server.cpp -lpthread\u3002<\/li>\n<li>\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u793a\u4f8b\u4ee3\u7801\u53ef\u4ee5\u5728\u817e\u8baf\u4e91\u5f00\u53d1\u8005\u793e\u533a\u627e\u5230\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u57fa\u672c\u7ed3\u6784&#xff1a;<\/p>\n<ul>\n<li>Request\u7c7b\u5305\u542b\u8bf7\u6c42\u65b9\u6cd5\u3001\u8def\u5f84\u3001\u67e5\u8be2\u5b57\u7b26\u4e32\u3001\u5934\u90e8\u548c\u6b63\u6587\u3002<\/li>\n<li>Response\u7c7b\u5305\u542b\u72b6\u6001\u7801\u3001\u5934\u90e8\u548c\u6b63\u6587\u3002<\/li>\n<li>Server\u7c7b\u5305\u542b\u5904\u7406\u4e0d\u540cHTTP\u65b9\u6cd5\u7684\u51fd\u6570&#xff0c;\u5982Get\u3001Post\u3001Put\u7b49\u3002<\/li>\n<li>Client\u7c7b\u5305\u542b\u521b\u5efa\u5ba2\u6237\u7aef\u548c\u53d1\u9001\u8bf7\u6c42\u7684\u65b9\u6cd5&#xff0c;\u5982Get\u3001Post\u3001Put\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>SSL\u652f\u6301&#xff1a;<\/p>\n<ul>\n<li>\u82e5\u8981\u4f7f\u7528SSL\u652f\u6301&#xff0c;\u9700\u8981\u5b9a\u4e49CPPHTTPLIB_OPENSSL_SUPPORT&#xff0c;\u5e76\u786e\u4fdd\u6709libssl\u548clibcrypto\u7684\u652f\u6301\u3002\u76ee\u524d\u53ea\u6709httplib 1.1.1\u7248\u672c\u652f\u6301SSL\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>GitHub\u5730\u5740&#xff1a;<\/p>\n<ul>\n<li>\u9879\u76ee\u7684GitHub\u5730\u5740\u4e3a&#xff1a;https:\/\/github.com\/yhirose\/cpp-httplib\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u4e5f\u53ef\u4ee5\u7528\u6211\u7684gitee \u56fd\u5185\u5730\u5740\u4e0b\u8f7d\u5feb&#xff0c;https:\/\/gitee.com\/TheSeaRefusesNoRiver\/cpp-httplib.git<\/p>\n<p>\u4e8c.\u8bf4\u660e 1.\u4e3a\u4ec0\u4e48\u63a8\u8350httplib\u5462&#xff1f;\u56e0\u4e3aC&#043;&#043; \u6ca1\u6709\u592a\u591a\u597d\u7528\u7684\u8f7b\u91cf\u7ea7\u7684\u670d\u52a1\u5668\u6846\u67b6\u3002\u50cfmongoose&#xff0c;oryx\u7b49\u7b49\u7528\u8d77\u6765\u5f88\u7e41\u7410\u3002\u5f53\u7136\u5f88\u5c11\u4f1a\u6709\u4eba\u4f7f\u7528c&#043;&#043; \u670d\u52a1\u5668\u6846\u67b6 \u256e&#xff08;&#xffe3;\u25bd&#xffe3;&#xff09;\u256d\u662f\u5427&#xff1f;\u8a00\u5f52\u6b63\u4f20&#xff0c;httplib\u4e00\u662f\u597d\u7528&#xff0c;\u8bed\u6cd5\u7b80\u5355&#xff0c;\u5199\u8d77\u6765\u975e\u5e38\u5bb9\u6613&#xff0c;\u53ea\u6709\u4e00\u4e2a\u5934\u6587\u4ef6\u5f15\u5165\u3002\u4e0d\u9700\u8981\u5bfc\u5165\u7c7b\u4f3cboost\u8fd9\u6837\u5f88\u590d\u6742\u7684\u4e09\u65b9\u5e93\u3002\u4e8c\u662f\u8de8\u5e73\u53f0&#xff0c;arm\u94f6\u6cb3\u9e92\u9e9f\u3001linux\u7684ubuntu\u3001centos\u548cwindow\u90fd\u53ef\u4ee5&#xff0c;\u7f16\u8bd1\u7b80\u5355\u3002\u4e09\u662f\u6027\u80fd\u597d&#xff0c;\u5f88\u5bb9\u6613\u901a\u8fc7&#xff0c;jmeter&#xff0c;apipost\u7b49\u6d4b\u8bd5\u5de5\u5177\u3002\u4e09\u662f\u5b83\u81ea\u8eab\u63d0\u4f9b\u4e00\u90e8\u5206\u670d\u52a1\u5668\u529f\u80fd&#xff0c;\u4e0d\u7528\u81ea\u5df1\u5199\u3002\u6bd4\u5982\u8bf4\u6587\u4ef6\u4e0b\u8f7d\u529f\u80fd\u3002\u4e0d\u7528\u989d\u5916\u6253\u4e00\u4e2anginx\u670d\u52a1\u5668\u4e86\u3002<\/p>\n<p>\u4e09.\u5199\u6cd5\u793a\u4f8b \u670d\u52a1\u5668<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;httplib.h&#034;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> httplib<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    Server svr<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u5b9a\u4e49\u6839\u8def\u5f84\u7684GET\u8bf7\u6c42\u5904\u7406\u5668<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> Request <span class=\"token operator\">&amp;<\/span>req<span class=\"token punctuation\">,<\/span> Response <span class=\"token operator\">&amp;<\/span>res<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        res<span class=\"token punctuation\">.<\/span><span class=\"token function\">set_content<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Welcome to the server!&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;text\/plain&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u5b9a\u4e49\/hello\u8def\u5f84\u7684GET\u8bf7\u6c42\u5904\u7406\u5668<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/hello&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> Request <span class=\"token operator\">&amp;<\/span>req<span class=\"token punctuation\">,<\/span> Response <span class=\"token operator\">&amp;<\/span>res<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        res<span class=\"token punctuation\">.<\/span><span class=\"token function\">set_content<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Hello, Client!&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;text\/plain&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u5b9a\u4e49\/echo\u8def\u5f84\u7684POST\u8bf7\u6c42\u5904\u7406\u5668<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">Post<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/echo&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> Request <span class=\"token operator\">&amp;<\/span>req<span class=\"token punctuation\">,<\/span> Response <span class=\"token operator\">&amp;<\/span>res<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        res<span class=\"token punctuation\">.<\/span><span class=\"token function\">set_content<\/span><span class=\"token punctuation\">(<\/span>req<span class=\"token punctuation\">.<\/span>body<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;text\/plain&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u542f\u52a8\u670d\u52a1\u5668&#xff0c;\u76d1\u542c\u7aef\u53e38080<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">listen<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;localhost&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">8080<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    std<span class=\"token operator\">::<\/span>cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Server started at http:\/\/localhost:8080&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u4e2a\u5199\u6cd5\u6bd4javaspringboot \u8fd8\u4f18\u96c5&#xff0c;\u5199\u6cd5\u516c\u5f0f&#xff1a; url &#043; lamda\u8868\u8fbe\u5f0f<\/p>\n<p>\u5ba2\u6237\u7aef<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;iostream&gt;<\/span><\/span><br \/>\n<span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&#034;httplib.h&#034;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> httplib<span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    Client <span class=\"token function\">cli<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;localhost&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">8080<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u53d1\u9001GET\u8bf7\u6c42\u5230\u670d\u52a1\u5668\u7684\u6839\u8def\u5f84<\/span><br \/>\n    <span class=\"token keyword\">auto<\/span> res_root <span class=\"token operator\">&#061;<\/span> cli<span class=\"token punctuation\">.<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>res_root <span class=\"token operator\">&amp;&amp;<\/span> res_root<span class=\"token operator\">-&gt;<\/span>status <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">200<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        std<span class=\"token operator\">::<\/span>cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Root Response: &#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> res_root<span class=\"token operator\">-&gt;<\/span>body <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        std<span class=\"token operator\">::<\/span>cerr <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Error: Unable to connect to server.&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u53d1\u9001GET\u8bf7\u6c42\u5230\u670d\u52a1\u5668\u7684\/hello\u8def\u5f84<\/span><br \/>\n    <span class=\"token keyword\">auto<\/span> res_hello <span class=\"token operator\">&#061;<\/span> cli<span class=\"token punctuation\">.<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/hello&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>res_hello <span class=\"token operator\">&amp;&amp;<\/span> res_hello<span class=\"token operator\">-&gt;<\/span>status <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">200<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        std<span class=\"token operator\">::<\/span>cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Hello Response: &#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> res_hello<span class=\"token operator\">-&gt;<\/span>body <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        std<span class=\"token operator\">::<\/span>cerr <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Error: Unable to connect to server.&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u53d1\u9001POST\u8bf7\u6c42\u5230\u670d\u52a1\u5668\u7684\/echo\u8def\u5f84<\/span><br \/>\n    <span class=\"token keyword\">auto<\/span> res_echo <span class=\"token operator\">&#061;<\/span> cli<span class=\"token punctuation\">.<\/span><span class=\"token function\">Post<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/echo&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;This is a POST request.&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;text\/plain&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>res_echo <span class=\"token operator\">&amp;&amp;<\/span> res_echo<span class=\"token operator\">-&gt;<\/span>status <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">200<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        std<span class=\"token operator\">::<\/span>cout <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Echo Response: &#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> res_echo<span class=\"token operator\">-&gt;<\/span>body <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        std<span class=\"token operator\">::<\/span>cerr <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token string\">&#034;Error: Unable to connect to server.&#034;<\/span> <span class=\"token operator\">&lt;&lt;<\/span> std<span class=\"token operator\">::<\/span>endl<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u56db.\u4f7f\u7528\u95ee\u9898 1.linux \u5e73\u53f0\u7f16\u8bd1\u9700\u8981\u94fe\u63a5 \u7ebf\u7a0b\u5e93g&#043;&#043; -o server server.cpp -lpthread 2.windows vistudio\u9700\u8981\u7248\u672c\u5927\u4e8e\u7b49\u4e8e2015&#xff0c;\u540c\u65f6\u6ce8\u610f\u8be5\u5e93\u4e0e\u5176\u4ed6socket \u5e93\u4f7f\u7528\u53ef\u80fd\u51b2\u7a81&#xff0c;\u4f7f\u7528\u9884\u7f16\u8bd1\u5b8fWIN32_LEAN_AND_MEAN (\u5173\u4e8eWIN32_LEAN_AND_MEAN\u5b8f\u5b9a\u4e49\u7684\u4f7f\u7528&#xff0c;\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5173\u952e\u4fe1\u606f&#xff1a;<\/p>\n<p>\u4f5c\u7528&#xff1a;WIN32_LEAN_AND_MEAN\u662f\u4e00\u4e2a\u9884\u5904\u7406\u5668\u5b8f\u5b9a\u4e49&#xff0c;\u901a\u5e38\u5728Windows\u7f16\u7a0b\u4e2d\u4f7f\u7528&#xff0c;\u7279\u522b\u662f\u5728\u5305\u542bWindows\u5934\u6587\u4ef6&#xff08;\u5982windows.h&#xff09;\u65f6\u3002\u5f53\u5728\u9879\u76ee\u4e2d\u5b9a\u4e49\u4e86WIN32_LEAN_AND_MEAN\u5b8f&#xff0c;\u5b83\u544a\u8bc9\u7f16\u8bd1\u5668\u4ec5\u5305\u542bWindows SDK\u4e2d\u6700\u5e38\u7528\u7684\u51fd\u6570\u548c\u6570\u636e\u7c7b\u578b&#xff0c;\u4ece\u800c\u51cf\u5c0f\u7f16\u8bd1\u65f6\u95f4\u548c\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5927\u5c0f \u3002<\/p>\n<p>\u51cf\u5c11\u7f16\u8bd1\u65f6\u95f4&#xff1a;\u901a\u8fc7\u6392\u9664\u4e0d\u5e38\u7528\u7684API\u548c\u6570\u636e\u7ed3\u6784&#xff0c;\u53ef\u4ee5\u663e\u8457\u51cf\u5c11\u5934\u6587\u4ef6\u7684\u5927\u5c0f&#xff0c;\u8fdb\u800c\u51cf\u5c11\u7f16\u8bd1\u65f6\u95f4 \u3002<\/p>\n<p>\u51cf\u5c0f\u7a0b\u5e8f\u5927\u5c0f&#xff1a;\u94fe\u63a5\u5230\u8f83\u5c11\u7684Windows\u5e93\u51fd\u6570\u53ef\u4ee5\u51cf\u5c0f\u6700\u7ec8\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5927\u5c0f \u3002<\/p>\n<p>\u51cf\u5c11\u547d\u540d\u51b2\u7a81&#xff1a;windows.h\u5305\u542b\u4e86\u5927\u91cf\u7684\u5b9a\u4e49&#xff0c;\u6709\u65f6\u5019\u53ef\u80fd\u4f1a\u4e0e\u9879\u76ee\u4e2d\u7684\u5176\u4ed6\u5934\u6587\u4ef6\u4ea7\u751f\u547d\u540d\u51b2\u7a81\u3002\u4f7f\u7528WIN32_LEAN_AND_MEAN\u53ef\u4ee5\u964d\u4f4e\u8fd9\u79cd\u98ce\u9669) 3.\u5141\u8bb8\u8de8\u57df\u53caoptions <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418232117-6802de6d080f6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;httplib.h&gt;<\/span><\/span><\/p>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">using<\/span> <span class=\"token keyword\">namespace<\/span> httplib<span class=\"token punctuation\">;<\/span><\/p>\n<p>    Server svr<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u8bbe\u7f6e\u5168\u5c40\u9ed8\u8ba4\u54cd\u5e94\u5934<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">set_default_headers<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;Access-Control-Allow-Origin&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;*&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;Access-Control-Allow-Methods&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;POST, GET, PUT, OPTIONS, DELETE&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;Access-Control-Max-Age&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;3600&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;Access-Control-Allow-Headers&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;*&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;Content-Type&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;application\/json;charset&#061;utf-8&#034;<\/span><span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u5904\u7406OPTIONS\u8bf7\u6c42&#xff0c;\u8fd9\u91cc\u5904\u7406\u590d\u6742\u7684\u524d\u7aef\u8bf7\u6c42\u3002\u4e5f\u5c31\u662f\u4e8c\u6b21\u8bbf\u95ee\u7684\u60c5\u51b5<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">Options<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/*&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> Request<span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">,<\/span> Response<span class=\"token operator\">&amp;<\/span> res<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        res<span class=\"token punctuation\">.<\/span>status <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">200<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u5176\u4ed6\u8def\u7531\u5904\u7406<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/test&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> Request<span class=\"token operator\">&amp;<\/span> req<span class=\"token punctuation\">,<\/span> Response<span class=\"token operator\">&amp;<\/span> res<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        res<span class=\"token punctuation\">.<\/span><span class=\"token function\">set_content<\/span><span class=\"token punctuation\">(<\/span><span class=\"token raw-string string\">R&#034;({&#034;message&#034;:&#034;Hello World!&#034;})&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;application\/json&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u542f\u52a8\u670d\u52a1\u5668<\/span><br \/>\n    svr<span class=\"token punctuation\">.<\/span><span class=\"token function\">listen<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;0.0.0.0&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">8090<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e46\u6b21\uff0c\u6536\u85cf45\u6b21\u3002C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib_c++ \u670d\u52a1\u7aef\u6846\u67b6<\/p>\n","protected":false},"author":2,"featured_media":23283,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,190,43],"topic":[],"class_list":["post-23284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c","tag-190","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib - \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\/23284.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e46\u6b21\uff0c\u6536\u85cf45\u6b21\u3002C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib_c++ \u670d\u52a1\u7aef\u6846\u67b6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/23284.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-18T23:21:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418232117-6802de6d080f6.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\/23284.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/23284.html\",\"name\":\"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T23:21:18+00:00\",\"dateModified\":\"2025-04-18T23:21:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/23284.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/23284.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/23284.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib\"}]},{\"@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":"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib - \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\/23284.html","og_locale":"zh_CN","og_type":"article","og_title":"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.2k\u6b21\uff0c\u70b9\u8d5e46\u6b21\uff0c\u6536\u85cf45\u6b21\u3002C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib_c++ \u670d\u52a1\u7aef\u6846\u67b6","og_url":"https:\/\/www.wsisp.com\/helps\/23284.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T23:21:18+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418232117-6802de6d080f6.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\/23284.html","url":"https:\/\/www.wsisp.com\/helps\/23284.html","name":"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T23:21:18+00:00","dateModified":"2025-04-18T23:21:18+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/23284.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/23284.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/23284.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"C++ \u8de8\u5e73\u53f0\u8f7b\u91cf\u7ea7\u670d\u52a1\u5668\u6846\u67b6httplib"}]},{"@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\/23284","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=23284"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/23284\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/23283"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=23284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=23284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=23284"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=23284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}