{"id":180349,"date":"2024-05-08T20:33:37","date_gmt":"2024-05-08T12:33:37","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/180349.html"},"modified":"2024-05-08T20:33:42","modified_gmt":"2024-05-08T12:33:42","slug":"r%e8%af%ad%e8%a8%80-%e5%a6%82%e4%bd%95%e8%8e%b7%e5%8f%96ajax%e5%bc%82%e6%ad%a5%e5%8a%a0%e8%bd%bd%e7%9a%84%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/180349.html","title":{"rendered":"R\u8bed\u8a00 \u5982\u4f55\u83b7\u53d6ajax\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27065511\/3042ded9-7b1e-4202-8770-77e032bff1f9.webp\" alt=\"R\u8bed\u8a00 \u5982\u4f55\u83b7\u53d6ajax\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\" \/><\/p>\n<p><p>\u8981\u5728R\u8bed\u8a00\u4e2d\u83b7\u53d6Ajax\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff0c\u53ef\u901a\u8fc7\u51e0\u79cd\u7b56\u7565\u5b9e\u73b0\uff0c\u5176\u4e2d\u5305\u62ec<strong>\u4f7f\u7528R\u8bed\u8a00\u7684RCurl\u6216httr\u5305\u53d1\u9001HTTP\u8bf7\u6c42\u3001\u4f7f\u7528Rvest\u5305\u8fdb\u884c\u7f51\u9875\u5185\u5bb9\u63d0\u53d6\u3001\u6216\u8005\u8fd0\u7528RSelenium\u5305\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c<\/strong>\u3002Ajax\u5f02\u6b65\u8bf7\u6c42\u901a\u5e38\u4f1a\u8fd4\u56deJSON\u6216XML\u683c\u5f0f\u7684\u6570\u636e\uff0c\u8fd9\u4e9b\u6570\u636e\u53ef\u4ee5\u901a\u8fc7\u7279\u5b9a\u7684URL\u5730\u5740\u83b7\u53d6\u3002\u8fd0\u7528R\u8bed\u8a00\u7684\u76f8\u5173\u5305\uff0c\u6211\u4eec\u53ef\u4ee5\u6a21\u62df\u6d4f\u89c8\u5668\u6216\u8005\u53d1\u9001HTTP\u8bf7\u6c42\u83b7\u53d6\u6570\u636e\u3002<strong>\u4f7f\u7528RSelenium\u5305\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c<\/strong>\u662f\u4e00\u4e2a\u6709\u6548\u7684\u7b56\u7565\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u81ea\u52a8\u5316\u6d4f\u89c8\u5668\u884c\u4e3a\u6765\u52a0\u8f7dAjax\u52a8\u6001\u751f\u6210\u7684\u5185\u5bb9\u3002 <\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u7406\u89e3AJAX\u5f02\u6b65\u52a0\u8f7d\u6570\u636e<\/h2>\n<\/p>\n<p><p>AJAX\uff08Asynchronous JavaScript and XML\uff09\u5141\u8bb8\u7f51\u9875\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u8fdb\u884c\u5f02\u6b65\u901a\u4fe1\u3002\u8fd9\u610f\u5473\u7740\u7f51\u9875\u53ef\u4ee5\u5728\u4e0d\u91cd\u65b0\u52a0\u8f7d\u6574\u4e2a\u9875\u9762\u7684\u60c5\u51b5\u4e0b\uff0c\u66f4\u65b0\u90e8\u5206\u7f51\u9875\u5185\u5bb9\u3002\u800c\u5728R\u8bed\u8a00\u4e2d\uff0c\u8981\u83b7\u53d6\u8fd9\u4e9b\u975e\u540c\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff0c\u9700\u8981\u7406\u89e3\u5f02\u6b65\u8bf7\u6c42\u7684\u5de5\u4f5c\u539f\u7406\u3002<\/p>\n<\/p>\n<p><p>Ajax\u901a\u5e38\u7528\u4e8e\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e\u7684URL\u901a\u5e38\u975e\u5e38\u9690\u85cf\uff0c\u53ef\u80fd\u9700\u8981\u5bf9\u7f51\u9875\u7684JavaScript\u4ee3\u7801\u8fdb\u884c\u4e00\u5b9a\u5206\u6790\u3002\u5f53\u5206\u6790\u4e86\u8fd9\u4e9b\u4ee3\u7801\u5e76\u627e\u5230\u6570\u636e\u8bf7\u6c42\u7684\u6b63\u786eURL\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528R\u8bed\u8a00\u76f4\u63a5\u8bbf\u95ee\u8fd9\u4e9bURL\u5e76\u83b7\u53d6\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528RCurl\u6216httr\u5305\u53d1\u9001HTTP\u8bf7\u6c42<\/h2>\n<\/p>\n<p><p>\u4f7f\u7528RCurl\u6216httr\u5305\uff0c\u4f60\u53ef\u4ee5\u6784\u9020HTTP\u8bf7\u6c42\u4ee5\u83b7\u53d6\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u3002\u901a\u5e38\uff0c\u8fd9\u6d89\u53ca\u5230\u8bc6\u522b\u6570\u636e\u52a0\u8f7d\u7684URL\u4ee5\u53ca\u9700\u8981\u4f20\u9012\u7684\u4efb\u4f55\u7279\u5b9a\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u4f7f\u7528httr\u5305\u53ef\u4ee5\u7ed3\u5408GET()\u51fd\u6570\u53d1\u9001\u8bf7\u6c42\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-r\">library(httr)<\/p>\n<p>response &lt;- GET(&quot;http:\/\/example.com\/ajax\/data&quot;)<\/p>\n<p>content &lt;- content(response, &quot;text&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u83b7\u53d6\u5230\u54cd\u5e94\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528R\u8bed\u8a00\u7684jsonlite\u6216XML\u5305\u5bf9\u8fd4\u56de\u7684JSON\u6216XML\u6570\u636e\u8fdb\u884c\u89e3\u6790\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528Rvest\u5305\u63d0\u53d6\u7f51\u9875\u5185\u5bb9<\/h2>\n<\/p>\n<p><p>Rvest\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684R\u8bed\u8a00\u5305\uff0c\u7528\u4e8e\u7f51\u9875\u6293\u53d6\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u5904\u7406\u7b80\u5355\u7684AJAX\u8bf7\u6c42\uff0c\u4f46\u5b83\u5728\u5904\u7406\u5305\u542b\u5927\u91cfJavaScript\u52a8\u6001\u5185\u5bb9\u7684\u7f51\u9875\u65f6\u6709\u9650\u5236\u3002\u5bf9\u4e8e\u6ca1\u6709\u901a\u8fc7\u590d\u6742JavaScript\u52a0\u8f7d\u6570\u636e\u7684\u9875\u9762\uff0cRvest\u901a\u5e38\u662f\u4e00\u4e2a\u597d\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-r\">library(rvest)<\/p>\n<p>webpage &lt;- read_html(&quot;http:\/\/example.com\/page-with-ajax&quot;)<\/p>\n<p>data_html &lt;- html_nodes(webpage, &quot;.class_of_data&quot;)<\/p>\n<p>data &lt;- html_text(data_html)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>html_nodes()<\/code>\u51fd\u6570\u7528\u6765\u67e5\u627e\u9875\u9762\u7684\u7279\u5b9a\u8282\u70b9\uff0c<code>.class_of_data<\/code>\u662f\u8282\u70b9\u7684CSS\u7c7b\u3002<code>html_text()<\/code>\u51fd\u6570\u7528\u6765\u63d0\u53d6\u8282\u70b9\u5185\u7684\u6587\u672c\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u8fd0\u7528RSelenium\u5305\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c<\/h2>\n<\/p>\n<p><p>\u5bf9\u4e8e\u90a3\u4e9b\u901a\u8fc7\u590d\u6742JavaScript\u811a\u672c\u6216\u6846\u67b6\uff08\u5982AngularJS\u3001ReactJS\u7b49\uff09\u5f02\u6b65\u52a0\u8f7d\u5185\u5bb9\u7684\u7f51\u9875\uff0c\u53ef\u4ee5\u4f7f\u7528RSelenium\u5305\u3002RSelenium\u53ef\u4ee5\u542f\u52a8\u548c\u63a7\u5236\u5b9e\u9645\u7684\u6d4f\u89c8\u5668\uff0c\u901a\u8fc7\u6a21\u62df\u4eba\u7c7b\u7528\u6237\u7684\u64cd\u4f5c\uff08\u5982\u70b9\u51fb\u3001\u6eda\u52a8\uff09\u6765\u83b7\u53d6\u52a8\u6001\u52a0\u8f7d\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-r\">library(RSelenium)<\/p>\n<p>driver &lt;- rsDriver(browser = &quot;chrome&quot;)<\/p>\n<p>remote_driver &lt;- driver[[&quot;client&quot;]]<\/p>\n<p>remote_driver$navigate(&quot;http:\/\/example.com\/page-with-ajax&quot;)<\/p>\n<p>page_source &lt;- remote_driver$getPageSource()[[1]]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>rsDriver()<\/code>\u51fd\u6570\u7528\u6765\u542f\u52a8\u6d4f\u89c8\u5668\uff0c<code>remote_driver$navigate()<\/code>\u5bfc\u822a\u5230\u542b\u6709Ajax\u52a0\u8f7d\u6570\u636e\u7684\u7f51\u9875\uff0c\u6700\u540e\u901a\u8fc7<code>getPageSource()<\/code>\u83b7\u53d6\u9875\u9762\u6e90\u7801\u3002\u63a5\u4e0b\u6765\uff0c\u53ef\u4ee5\u7528Rvest\u5305\u7684\u51fd\u6570\u63d0\u53d6\u6240\u9700\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h2>\u4e94\u3001\u89e3\u6790\u548c\u5904\u7406\u83b7\u53d6\u7684\u6570\u636e<\/h2>\n<\/p>\n<p><p>\u65e0\u8bba\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\u83b7\u53d6\u5230\u6570\u636e\uff0c\u6700\u7ec8\u90fd\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u89e3\u6790\u548c\u5904\u7406\u3002\u5982\u679c\u6570\u636e\u662fJSON\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>jsonlite<\/code>\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-r\">library(jsonlite)<\/p>\n<p>json_data &lt;- fromJSON(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5bf9\u4e8eXML\u6570\u636e\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528<code>XML<\/code>\u6216\u8005<code>xml2<\/code>\u5305\u8fdb\u884c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-r\">library(xml2)<\/p>\n<p>xml_data &lt;- read_xml(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u4f60\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u7ed3\u6784\u5316\u7684\u6570\u636e\u8f6c\u6362\u4e3a\u6570\u636e\u6846<code>data.frame<\/code>\u6216<code>tibble<\/code>\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u5206\u6790\u4e0e\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h2>\u516d\u3001\u5904\u7406\u5206\u9875\u6216\u65e0\u9650\u6eda\u52a8\u52a0\u8f7d\u7684\u6570\u636e<\/h2>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5206\u9875\u6216\u65e0\u9650\u6eda\u52a8\u52a0\u8f7d\u66f4\u591a\u6570\u636e\u7684\u60c5\u51b5\uff0c\u53ef\u80fd\u9700\u8981\u8fd0\u884c\u5faa\u73af\u6216\u9012\u5f52\u51fd\u6570\uff0c\u6a21\u62df\u7528\u6237\u4e0d\u65ad\u89e6\u53d1\u7684\u8bf7\u6c42\uff0c\u83b7\u53d6\u6240\u6709\u9875\u9762\u4e0a\u7684\u6570\u636e\u3002\u5982\u679c\u662f\u5206\u9875\uff0c\u4f60\u9700\u8981\u4fee\u6539HTTP\u8bf7\u6c42\u7684\u53c2\u6570\u6765\u8bbf\u95ee\u4e0d\u540c\u7684\u9875\u9762\u3002\u5982\u679c\u662f\u65e0\u9650\u6eda\u52a8\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u5728\u4f7f\u7528RSelenium\u65f6\u6a21\u62df\u6eda\u52a8\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-r\"># \u793a\u4f8b\uff1a\u5faa\u73af\u83b7\u53d6\u5206\u9875\u6570\u636e<\/p>\n<p>page_number &lt;- 1<\/p>\n<p>repeat {<\/p>\n<p>    response &lt;- GET(paste0(&quot;http:\/\/example.com\/data?page=&quot;, page_number))<\/p>\n<p>    # \u5904\u7406response\u83b7\u53d6\u6570\u636e<\/p>\n<p>    # ...<\/p>\n<p>    if (condition_to_stop) {<\/p>\n<p>        break<\/p>\n<p>    }<\/p>\n<p>    page_number &lt;- page_number + 1<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u5904\u7406\u597d\u6240\u6709\u6570\u636e\u4e4b\u540e\uff0c\u5bf9\u4e8e\u5927\u89c4\u6a21\u7684\u6570\u636e\u91c7\u96c6\u9879\u76ee\uff0c\u901a\u5e38\u9700\u8981\u8003\u8651\u6570\u636e\u7684\u5b58\u50a8\u3001\u8fdb\u4e00\u6b65\u7684\u6e05\u6d17\u548c\u5206\u6790\uff0c\u4ee5\u5f97\u51fa\u6709\u7528\u7684\u4fe1\u606f\u3002\u8003\u8651\u5230\u6570\u636e\u5206\u6790\u7684\u5b8c\u6574\u6d41\u7a0b\uff0cR\u8bed\u8a00\u7684\u5176\u4ed6\u5305\u5982<code>dplyr<\/code>\u3001<code>tidyr<\/code>\u3001<code>ggplot2<\/code>\u7b49\uff0c\u4e5f\u4f1a\u88ab\u7528\u6765\u8fdb\u884c\u6570\u636e\u5904\u7406\u53ca\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\u6765\u8bf4\uff0c\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728R\u8bed\u8a00\u4e2d\u6709\u6548\u5730\u83b7\u53d6\u7531Ajax\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u3002\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u5efa\u8bae\u7ed3\u5408\u8fd9\u4e9b\u65b9\u6cd5\u7684\u4f18\u70b9\uff0c\u9488\u5bf9\u4e0d\u540c\u7684\u7f51\u7ad9\u7279\u70b9\u9009\u62e9\u6700\u4f73\u7684\u6570\u636e\u83b7\u53d6\u7b56\u7565\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1.  R\u8bed\u8a00\u4e2d\u5982\u4f55\u83b7\u53d6\u901a\u8fc7AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff1f<\/strong><\/p>\n<p>\u4f7f\u7528R\u8bed\u8a00\u83b7\u53d6\u901a\u8fc7AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5b8c\u6210\uff1a<\/p>\n<p>a. \u9996\u5148\uff0c\u4f7f\u7528R\u4e2d\u7684\u4e00\u4e2aHTTP\u8bf7\u6c42\u5e93\uff0c\u4f8b\u5982 <code>httr<\/code>\uff0c\u6765\u53d1\u9001\u4e00\u4e2aGET\u8bf7\u6c42\u5230AJAX\u63a5\u53e3\u7684URL\u3002<\/p>\n<p>b. \u63a5\u4e0b\u6765\uff0c\u83b7\u53d6AJAX\u54cd\u5e94\u7684\u5185\u5bb9\u3002\u901a\u5e38\uff0c\u8fd9\u4e2a\u5185\u5bb9\u662f\u4ee5JSON\u683c\u5f0f\u8fd4\u56de\u7684\u3002\u53ef\u4ee5\u4f7f\u7528R\u4e2d\u7684 <code>jsonlite<\/code> \u5e93\u6765\u89e3\u6790\u8fd9\u4e2aJSON\u54cd\u5e94\u3002<\/p>\n<p>c. \u4e00\u65e6\u6210\u529f\u89e3\u6790JSON\u54cd\u5e94\uff0c\u5c31\u53ef\u4ee5\u5904\u7406\u548c\u5206\u6790\u6570\u636e\u4e86\u3002\u4f7f\u7528R\u7684\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u5de5\u5177\uff0c\u4f8b\u5982 <code>dplyr<\/code> \u548c <code>ggplot2<\/code>\uff0c\u6765\u5904\u7406\u548c\u53ef\u89c6\u5316\u83b7\u5f97\u7684\u6570\u636e\u3002<\/p>\n<p><strong>2. \u5982\u4f55\u5728R\u8bed\u8a00\u4e2d\u5904\u7406AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff1f<\/strong><\/p>\n<p>\u5728R\u8bed\u8a00\u4e2d\u5904\u7406AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5b8c\u6210\uff1a<\/p>\n<p>a. \u4f7f\u7528R\u4e2d\u7684\u4e00\u4e2aHTTP\u8bf7\u6c42\u5e93\uff0c\u4f8b\u5982 <code>httr<\/code>\uff0c\u53d1\u9001\u4e00\u4e2aGET\u8bf7\u6c42\u5230AJAX\u63a5\u53e3\u7684URL\u3002<\/p>\n<p>b. \u786e\u8ba4\u8bf7\u6c42\u6210\u529f\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528R\u7684JSON\u89e3\u6790\u5e93\uff0c\u4f8b\u5982 <code>jsonlite<\/code>\uff0c\u5c06AJAX\u54cd\u5e94\u89e3\u6790\u4e3aR\u4e2d\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p>c. \u5bf9\u6570\u636e\u8fdb\u884c\u5904\u7406\u548c\u5206\u6790\u3002\u4f7f\u7528R\u7684\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u5de5\u5177\uff0c\u4f8b\u5982 <code>dplyr<\/code> \u548c <code>ggplot2<\/code>\uff0c\u6765\u5bf9\u83b7\u5f97\u7684\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\u548c\u53ef\u89c6\u5316\u3002<\/p>\n<p><strong>3. R\u8bed\u8a00\u4e2d\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff1f<\/strong><\/p>\n<p>\u5728R\u8bed\u8a00\u4e2d\uff0c\u6709\u51e0\u4e2a\u5e38\u7528\u7684\u5e93\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff1a<\/p>\n<p>a. <code>httr<\/code>\uff1a\u8fd9\u662f\u4e00\u4e2a\u5e38\u7528\u7684HTTP\u8bf7\u6c42\u5e93\uff0c\u53ef\u4ee5\u7528\u4e8e\u53d1\u9001GET\u6216POST\u8bf7\u6c42\u3002\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u53d1\u9001AJAX\u8bf7\u6c42\uff0c\u83b7\u53d6\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u3002<\/p>\n<p>b. <code>jsonlite<\/code>\uff1a\u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u89e3\u6790JSON\u6570\u636e\u7684\u5e93\u3002\u4e00\u65e6\u83b7\u5f97\u4e86\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>jsonlite<\/code> \u5c06\u5176\u89e3\u6790\u4e3aR\u4e2d\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p>c. <code>rvest<\/code>\uff1a\u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u7f51\u9875\u6293\u53d6\u548c\u6570\u636e\u63d0\u53d6\u7684\u5e93\u3002\u867d\u7136\u5b83\u4e3b\u8981\u7528\u4e8e\u7f51\u9875\u6293\u53d6\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u83b7\u53d6AJAX\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728R\u8bed\u8a00\u4e2d\u83b7\u53d6Ajax\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\uff0c\u53ef\u901a\u8fc7\u51e0\u79cd\u7b56\u7565\u5b9e\u73b0\uff0c\u5176\u4e2d\u5305\u62ec\u4f7f\u7528R\u8bed\u8a00\u7684RCurl\u6216httr\u5305\u53d1\u9001HT [&hellip;]","protected":false},"author":3,"featured_media":180354,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/180349"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=180349"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/180349\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/180354"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=180349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=180349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=180349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}