{"id":3340,"date":"2025-03-29T17:20:36","date_gmt":"2025-03-29T09:20:36","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=3340"},"modified":"2025-03-29T17:20:36","modified_gmt":"2025-03-29T09:20:36","slug":"c-web-%e7%bc%96%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/03\/29\/c-web-%e7%bc%96%e7%a8%8b\/","title":{"rendered":"C++ Web \u7f16\u7a0b"},"content":{"rendered":"\n<p>C++ \u662f\u4e00\u79cd\u975e\u5e38\u9ad8\u6548\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u7cfb\u7edf\u7f16\u7a0b\u3001\u6e38\u620f\u5f00\u53d1\u3001\u56fe\u5f62\u6e32\u67d3\u7b49\u9886\u57df\uff0c\u7136\u800c\u5728 Web \u5f00\u53d1\u4e2d\uff0c\u5b83\u76f8\u5bf9\u4e8e\u5176\u4ed6\u8bed\u8a00\uff08\u5982 Python\u3001JavaScript\uff09\u5e76\u4e0d\u5e38\u89c1\u3002\u4e0d\u8fc7\uff0cC++ \u5728 Web \u7f16\u7a0b\u4e2d\u4e5f\u6709\u4e00\u4e9b\u5e94\u7528\uff0c\u7279\u522b\u662f\u5728\u9700\u8981\u9ad8\u6027\u80fd\u548c\u5e95\u5c42\u63a7\u5236\u7684\u573a\u666f\u3002<\/p>\n\n\n\n<p>C++ Web \u7f16\u7a0b\u901a\u5e38\u6d89\u53ca\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u521b\u5efa Web \u670d\u52a1\u5668<\/strong><\/li>\n\n\n\n<li><strong>\u5904\u7406 HTTP \u8bf7\u6c42\u548c\u54cd\u5e94<\/strong><\/li>\n\n\n\n<li><strong>\u4e0e\u6570\u636e\u5e93\u4ea4\u4e92<\/strong><\/li>\n\n\n\n<li><strong>Web \u6846\u67b6\u4e0e\u5e93<\/strong><\/li>\n<\/ol>\n\n\n\n<p>\u4e0b\u9762\u662f\u5173\u4e8e C++ Web \u7f16\u7a0b\u7684\u4e00\u4e9b\u57fa\u672c\u6982\u5ff5\u4e0e\u5b9e\u73b0\u65b9\u6cd5\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. \u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 Web \u670d\u52a1\u5668<\/strong><\/h2>\n\n\n\n<p>\u6700\u57fa\u672c\u7684 Web \u670d\u52a1\u5668\u9700\u8981\u80fd\u591f\u5904\u7406 HTTP \u8bf7\u6c42\uff0c\u53d1\u9001\u54cd\u5e94\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff0cC++ \u4e2d\u6709\u591a\u4e2a\u7b2c\u4e09\u65b9\u5e93\u53ef\u4ee5\u5e2e\u52a9\u5b9e\u73b0\uff0c\u4f8b\u5982 <strong>Boost.Asio<\/strong>\u3001<strong>CppCMS<\/strong>\u3001<strong>Crow<\/strong> \u7b49\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1 \u4f7f\u7528 Boost.Asio \u521b\u5efa Web \u670d\u52a1\u5668<\/strong><\/h3>\n\n\n\n<p><code>Boost.Asio<\/code> \u662f\u4e00\u4e2a\u5e7f\u6cdb\u4f7f\u7528\u7684 C++ \u7f51\u7edc\u5e93\uff0c\u652f\u6301 TCP\/IP \u534f\u8bae\u6808\u7684\u7f51\u7edc\u7f16\u7a0b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684 HTTP \u670d\u52a1\u5668\u793a\u4f8b\uff0c\u4f7f\u7528 Boost.Asio \u6765\u5904\u7406\u5ba2\u6237\u7aef\u8bf7\u6c42\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\n#include &lt;boost\/asio.hpp&gt;\n#include &lt;string&gt;\n\nusing boost::asio::ip::tcp;\n\nvoid handle_request(tcp::socket &amp;socket) {\n    std::string response = \"HTTP\/1.1 200 OK\\r\\nContent-Type: text\/plain\\r\\n\\r\\nHello, World!\";\n    boost::asio::write(socket, boost::asio::buffer(response));\n}\n\nint main() {\n    boost::asio::io_service io_service;\n    tcp::endpoint endpoint(tcp::v4(), 8080);\n    tcp::acceptor acceptor(io_service, endpoint);\n\n    std::cout &lt;&lt; \"Server started on port 8080...\\n\";\n\n    while (true) {\n        tcp::socket socket(io_service);\n        acceptor.accept(socket);\n        handle_request(socket);\n    }\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u89e3\u91ca\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>boost::asio::io_service<\/code> \u7528\u4e8e\u6267\u884c\u5f02\u6b65\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li><code>tcp::acceptor<\/code> \u521b\u5efa\u4e86\u4e00\u4e2a\u670d\u52a1\u5668\u5957\u63a5\u5b57\uff0c\u76d1\u542c\u7aef\u53e3 8080\u3002<\/li>\n\n\n\n<li><code>handle_request<\/code> \u51fd\u6570\u7528\u4e8e\u5904\u7406\u4f20\u5165\u7684 HTTP \u8bf7\u6c42\u5e76\u8fd4\u56de\u4e00\u4e2a\u7b80\u5355\u7684\u54cd\u5e94\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.2 \u4f7f\u7528 Crow \u6846\u67b6\u521b\u5efa Web \u670d\u52a1\u5668<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/crowcpp.org\/\"><strong>Crow<\/strong><\/a> \u662f\u4e00\u4e2a\u73b0\u4ee3\u7684 C++ \u5fae\u6846\u67b6\uff0c\u7075\u611f\u6765\u81ea\u4e8e Python \u7684 Flask\uff0c\u5b83\u63d0\u4f9b\u4e86\u5feb\u901f\u6784\u5efa Web \u5e94\u7528\u7a0b\u5e8f\u7684\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5 Crow\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/CrowCpp\/crow.git\ncd crow\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install<\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528 Crow \u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 Web \u670d\u52a1\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"crow_all.h\"\n\nint main() {\n    crow::SimpleApp app;\n\n    CROW_ROUTE(app, \"\/\")(&#91;](){\n        return \"Hello, C++ Web!\";\n    });\n\n    app.port(8080).multithreaded().run();\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u89e3\u91ca\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>crow::SimpleApp<\/code> \u662f Crow \u5e94\u7528\u7684\u57fa\u7840\u7c7b\u3002<\/li>\n\n\n\n<li><code>CROW_ROUTE<\/code> \u5b8f\u5b9a\u4e49\u4e86 Web \u8def\u7531\uff0c\u5f53\u8bbf\u95ee\u6839\u8def\u5f84\u65f6\u8fd4\u56de &#8220;Hello, C++ Web!&#8221;\u3002<\/li>\n\n\n\n<li><code>app.port(8080).multithreaded().run();<\/code> \u542f\u52a8\u670d\u52a1\u5668\uff0c\u5e76\u76d1\u542c 8080 \u7aef\u53e3\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. \u5904\u7406 HTTP \u8bf7\u6c42\u548c\u54cd\u5e94<\/strong><\/h2>\n\n\n\n<p>Web \u5f00\u53d1\u4e2d\uff0cHTTP \u8bf7\u6c42\u548c\u54cd\u5e94\u662f\u57fa\u7840\u6982\u5ff5\u3002C++ \u4e2d\u7684 Web \u6846\u67b6\u6216\u5e93\u901a\u5e38\u4f1a\u4e3a\u4f60\u5c01\u88c5\u8fd9\u4e9b\u590d\u6742\u7684\u7ec6\u8282\uff0c\u7b80\u5316 HTTP \u8bf7\u6c42\u5904\u7406\u3002\u4ee5\u4e0b\u662f Web \u7f16\u7a0b\u5e38\u89c1\u7684\u8bf7\u6c42\u5904\u7406\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u89e3\u6790 HTTP \u8bf7\u6c42<\/strong><\/h3>\n\n\n\n<p>C++ \u7684\u4e00\u4e9b Web \u6846\u67b6\uff08\u5982 Crow\u3001CppCMS\uff09\u4f1a\u81ea\u52a8\u89e3\u6790\u8bf7\u6c42\u5e76\u4e3a\u4f60\u63d0\u4f9b\u4e00\u4e2a\u65b9\u4fbf\u7684 API\u3002\u4f8b\u5982\uff0c\u5728 Crow \u4e2d\uff0c\u5904\u7406\u8bf7\u6c42\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CROW_ROUTE(app, \"\/hello\/&lt;int&gt;\")\n(&#91;](int name){\n    return \"Hello, \" + std::to_string(name);\n});<\/code><\/pre>\n\n\n\n<p><strong>\u89e3\u91ca\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/&lt;int><\/code> \u4f1a\u5339\u914d\u6570\u5b57\u7c7b\u578b\u7684 URL \u53c2\u6570\u3002\u8bbf\u95ee <code>\/hello\/123<\/code> \u4f1a\u8fd4\u56de <code>Hello, 123<\/code>\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 \u6784\u5efa HTTP \u54cd\u5e94<\/strong><\/h3>\n\n\n\n<p>HTTP \u54cd\u5e94\u901a\u5e38\u5305\u542b\u72b6\u6001\u7801\u3001\u5934\u90e8\u4fe1\u606f\u548c\u6b63\u6587\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528 Crow \u5e93\u6765\u8bbe\u7f6e\u54cd\u5e94\u5934\u90e8\u5e76\u8fd4\u56de JSON \u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"crow_all.h\"\n\nint main() {\n    crow::SimpleApp app;\n\n    CROW_ROUTE(app, \"\/json\")(&#91;](){\n        crow::json::wvalue x;\n        x&#91;\"message\"] = \"Hello, JSON!\";\n        return x;\n    });\n\n    app.port(8080).run();\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u89e3\u91ca\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>crow::json::wvalue<\/code> \u662f\u4e00\u4e2a JSON \u5bf9\u8c61\uff0c\u53ef\u4ee5\u7528\u6765\u6784\u5efa\u54cd\u5e94\u5185\u5bb9\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u4e0e\u6570\u636e\u5e93\u4ea4\u4e92<\/strong><\/h2>\n\n\n\n<p>C++ Web \u5f00\u53d1\u4e2d\uff0c\u901a\u5e38\u9700\u8981\u4e0e\u6570\u636e\u5e93\u4ea4\u4e92\uff08\u5982 MySQL\u3001PostgreSQL \u7b49\uff09\u3002C++ \u4e2d\u6709\u8bb8\u591a\u7b2c\u4e09\u65b9\u5e93\u53ef\u4ee5\u7b80\u5316\u4e0e\u6570\u636e\u5e93\u7684\u8fde\u63a5\u4e0e\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 \u4f7f\u7528 MySQL \u6570\u636e\u5e93<\/strong><\/h3>\n\n\n\n<p>C++ \u4e0e MySQL \u4ea4\u4e92\u5e38\u7528\u7684\u5e93\u662f <strong>MySQL Connector\/C++<\/strong>\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a C++ \u63a5\u53e3\u7528\u4e8e\u6267\u884c SQL \u67e5\u8be2\u3001\u83b7\u53d6\u6570\u636e\u7b49\u3002<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u5b89\u88c5 MySQL Connector\/C++\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install libmysqlcppconn-dev<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u8fde\u63a5\u5230 MySQL \u6570\u636e\u5e93\u5e76\u67e5\u8be2\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;mysql_driver.h&gt;\n#include &lt;mysql_connection.h&gt;\n#include &lt;iostream&gt;\n\nint main() {\n    sql::mysql::MySQL_Driver *driver;\n    sql::Connection *con;\n\n    driver = sql::mysql::get_mysql_driver_instance();\n    con = driver-&gt;connect(\"tcp:\/\/127.0.0.1:3306\", \"user\", \"password\");\n\n    con-&gt;setSchema(\"test_db\");\n\n    sql::Statement *stmt = con-&gt;createStatement();\n    sql::ResultSet *res = stmt-&gt;executeQuery(\"SELECT * FROM my_table\");\n\n    while (res-&gt;next()) {\n        std::cout &lt;&lt; res-&gt;getString(\"column_name\") &lt;&lt; std::endl;\n    }\n\n    delete res;\n    delete stmt;\n    delete con;\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 <code>mysql_driver<\/code> \u83b7\u53d6 MySQL \u9a71\u52a8\u5b9e\u4f8b\u5e76\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002<\/li>\n\n\n\n<li>\u6267\u884c SQL \u67e5\u8be2\u5e76\u8f93\u51fa\u67e5\u8be2\u7ed3\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 \u4f7f\u7528 PostgreSQL \u6570\u636e\u5e93<\/strong><\/h3>\n\n\n\n<p>PostgreSQL \u548c MySQL \u7c7b\u4f3c\uff0c\u53ef\u4ee5\u4f7f\u7528 <strong>libpqxx<\/strong> \u5e93\u4e0e PostgreSQL \u6570\u636e\u5e93\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u5b89\u88c5 <code>libpqxx<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install libpqxx-dev<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fde\u63a5 PostgreSQL \u6570\u636e\u5e93\u5e76\u67e5\u8be2\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\n#include &lt;pqxx\/pqxx&gt;\n\nint main() {\n    try {\n        pqxx::connection C(\"dbname=test_db user=user password=password host=127.0.0.1 port=5432\");\n        pqxx::work W(C);\n\n        pqxx::result R = W.exec(\"SELECT * FROM my_table\");\n\n        for (auto row : R) {\n            std::cout &lt;&lt; row&#91;\"column_name\"].as&lt;std::string&gt;() &lt;&lt; std::endl;\n        }\n\n        W.commit();\n    } catch (const std::exception &amp;e) {\n        std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;\n    }\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p><strong>\u8bf4\u660e\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 <code>pqxx::connection<\/code> \u8fde\u63a5\u5230 PostgreSQL \u6570\u636e\u5e93\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528 <code>pqxx::work<\/code> \u521b\u5efa\u5de5\u4f5c\u4e8b\u52a1\u5e76\u6267\u884c\u67e5\u8be2\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u5176\u4ed6 C++ Web \u6846\u67b6<\/strong><\/h2>\n\n\n\n<p>\u9664\u4e86 Crow \u548c Boost.Asio\uff0cC++ \u8fd8\u6709\u8bb8\u591a\u5176\u4ed6 Web \u5f00\u53d1\u6846\u67b6\uff0c\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u9700\u6c42\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.1 CppCMS<\/strong><\/h3>\n\n\n\n<p><a href=\"http:\/\/cppcms.com\/\">CppCMS<\/a> \u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684 C++ Web \u6846\u67b6\uff0c\u7279\u522b\u9002\u7528\u4e8e\u9700\u8981\u9ad8\u541e\u5410\u91cf\u548c\u4f4e\u5ef6\u8fdf\u7684 Web \u5e94\u7528\u3002\u5b83\u63d0\u4f9b\u4e86\u5305\u62ec HTTP \u670d\u52a1\u5668\u3001\u6a21\u677f\u5f15\u64ce\u3001\u6570\u636e\u5e93\u652f\u6301\u7b49\u591a\u79cd\u529f\u80fd\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.2 Pistache<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/github.com\/pistacheio\/pistache\">Pistache<\/a> \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 C++ REST API \u6846\u67b6\uff0c\u6613\u4e8e\u4f7f\u7528\u4e14\u5177\u6709\u8f83\u597d\u7684\u6027\u80fd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. \u5c0f\u7ed3<\/strong><\/h2>\n\n\n\n<p>C++ \u5728 Web \u7f16\u7a0b\u4e2d\u7684\u5e94\u7528\u5e76\u4e0d\u50cf\u5176\u4ed6\u8bed\u8a00\u90a3\u6837\u666e\u904d\uff0c\u4f46\u5b83\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u9ad8\u6548\u7684 Web \u670d\u52a1\u5668\u3001\u5904\u7406 HTTP \u8bf7\u6c42\u548c\u54cd\u5e94\u3001\u4e0e\u6570\u636e\u5e93\u4ea4\u4e92\u7b49\u3002\u901a\u8fc7\u4f7f\u7528\u73b0\u6709\u7684\u5e93\u548c\u6846\u67b6\uff08\u5982 Boost.Asio\u3001Crow\u3001CppCMS \u7b49\uff09\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u9ad8\u6027\u80fd\u7684 Web \u5e94\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C++ \u662f\u4e00\u79cd\u975e\u5e38\u9ad8\u6548\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u7cfb\u7edf\u7f16\u7a0b\u3001\u6e38\u620f\u5f00\u53d1\u3001\u56fe\u5f62\u6e32\u67d3\u7b49\u9886\u57df\uff0c\u7136\u800c\u5728 Web \u5f00\u53d1\u4e2d\uff0c\u5b83\u76f8\u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3341,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[],"class_list":["post-3340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=3340"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3340\/revisions"}],"predecessor-version":[{"id":3342,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3340\/revisions\/3342"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media\/3341"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=3340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=3340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=3340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}