{"id":1083978,"date":"2025-01-08T13:03:05","date_gmt":"2025-01-08T05:03:05","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1083978.html"},"modified":"2025-01-08T13:03:07","modified_gmt":"2025-01-08T05:03:07","slug":"python%e5%90%8e%e7%ab%af%e5%a6%82%e4%bd%95%e6%8e%a5%e5%8f%97%e5%b0%8f%e7%a8%8b%e5%ba%8f%e4%bc%a0%e9%80%92%e6%96%87%e4%bb%b6-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1083978.html","title":{"rendered":"python\u540e\u7aef\u5982\u4f55\u63a5\u53d7\u5c0f\u7a0b\u5e8f\u4f20\u9012\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24194544\/a21e7e1c-90ac-4c18-84c7-ea55b748980c.webp\" alt=\"python\u540e\u7aef\u5982\u4f55\u63a5\u53d7\u5c0f\u7a0b\u5e8f\u4f20\u9012\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>Python\u540e\u7aef\u63a5\u53d7\u5c0f\u7a0b\u5e8f\u4f20\u9012\u6587\u4ef6\u7684\u6838\u5fc3\u6b65\u9aa4\u5305\u62ec\uff1a\u4f7f\u7528Flask\u6846\u67b6\u3001\u8bbe\u7f6e\u6587\u4ef6\u4e0a\u4f20\u8def\u5f84\u3001\u4f7f\u7528request\u5bf9\u8c61\u8bfb\u53d6\u6587\u4ef6\u6570\u636e\u3001\u5904\u7406\u5e76\u4fdd\u5b58\u6587\u4ef6<\/strong>\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u540e\u7aef\u63a5\u53d7\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4f20\u9012\u7684\u6587\u4ef6\uff0c\u5e76\u8fdb\u884c\u5904\u7406\u548c\u4fdd\u5b58\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u548c\u914d\u7f6eFlask\u6846\u67b6<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5Flask\u6846\u67b6\u3002Flask\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684Python web\u6846\u67b6\uff0c\u975e\u5e38\u9002\u5408\u5feb\u901f\u5f00\u53d1API\u63a5\u53e3\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Flask\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install Flask<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aFlask\u5e94\u7528\uff0c\u5e76\u914d\u7f6e\u6587\u4ef6\u4e0a\u4f20\u7684\u8def\u5f84\u548c\u6700\u5927\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684Flask\u5e94\u7528\u914d\u7f6e\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, request, jsonify<\/p>\n<p>import os<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>app.config[&#39;UPLOAD_FOLDER&#39;] = &#39;\/path\/to\/upload&#39;  # \u8bbe\u7f6e\u6587\u4ef6\u4e0a\u4f20\u8def\u5f84<\/p>\n<p>app.config[&#39;MAX_CONTENT_LENGTH&#39;] = 16 * 1024 * 1024  # \u8bbe\u7f6e\u6700\u5927\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u4e3a16MB<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u521b\u5efa\u6587\u4ef6\u4e0a\u4f20\u63a5\u53e3<\/p>\n<\/p>\n<p><p>\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u63a5\u6536\u6587\u4ef6\u4e0a\u4f20\u7684\u8def\u7531\uff0c\u5e76\u5728\u5176\u4e2d\u5904\u7406\u6587\u4ef6\u4e0a\u4f20\u8bf7\u6c42\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5904\u7406\u6587\u4ef6\u4e0a\u4f20\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">@app.route(&#39;\/upload&#39;, methods=[&#39;POST&#39;])<\/p>\n<p>def upload_file():<\/p>\n<p>    if &#39;file&#39; not in request.files:<\/p>\n<p>        return jsonify({&quot;error&quot;: &quot;No file part&quot;}), 400<\/p>\n<p>    file = request.files[&#39;file&#39;]<\/p>\n<p>    if file.filename == &#39;&#39;:<\/p>\n<p>        return jsonify({&quot;error&quot;: &quot;No selected file&quot;}), 400<\/p>\n<p>    if file:<\/p>\n<p>        filename = secure_filename(file.filename)<\/p>\n<p>        file_path = os.path.join(app.config[&#39;UPLOAD_FOLDER&#39;], filename)<\/p>\n<p>        file.save(file_path)<\/p>\n<p>        return jsonify({&quot;message&quot;: &quot;File uploaded successfully&quot;, &quot;file_path&quot;: file_path}), 200<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3a<code>\/upload<\/code>\u7684POST\u8def\u7531\uff0c\u7528\u4e8e\u63a5\u6536\u6587\u4ef6\u4e0a\u4f20\u8bf7\u6c42\u3002\u9996\u5148\u68c0\u67e5\u8bf7\u6c42\u4e2d\u662f\u5426\u5305\u542b\u6587\u4ef6\u90e8\u5206\uff0c\u5176\u6b21\u68c0\u67e5\u6587\u4ef6\u540d\u662f\u5426\u4e3a\u7a7a\uff0c\u6700\u540e\u5c06\u6587\u4ef6\u4fdd\u5b58\u5230\u6307\u5b9a\u8def\u5f84\uff0c\u5e76\u8fd4\u56de\u4e0a\u4f20\u6210\u529f\u7684\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u5904\u7406\u4e0a\u4f20\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5728\u4fdd\u5b58\u6587\u4ef6\u4e4b\u540e\uff0c\u53ef\u80fd\u9700\u8981\u5bf9\u6587\u4ef6\u8fdb\u884c\u8fdb\u4e00\u6b65\u5904\u7406\u3002\u4f8b\u5982\uff0c\u89e3\u6790\u6587\u4ef6\u5185\u5bb9\u3001\u5b58\u50a8\u5230\u6570\u636e\u5e93\u6216\u8fdb\u884c\u5176\u4ed6\u4e1a\u52a1\u903b\u8f91\u5904\u7406\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u6587\u4ef6\u5904\u7406\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>def process_uploaded_file(file_path):<\/p>\n<p>    # \u5047\u8bbe\u4e0a\u4f20\u7684\u662f\u4e00\u4e2aCSV\u6587\u4ef6<\/p>\n<p>    data = pd.read_csv(file_path)<\/p>\n<p>    # \u8fdb\u884c\u6570\u636e\u5904\u7406\uff0c\u4f8b\u5982\u5b58\u50a8\u5230\u6570\u636e\u5e93<\/p>\n<p>    # ...<\/p>\n<p>    return data<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7aef\u4e0a\u4f20\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u5728\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7aef\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>wx.uploadFile<\/code>\u63a5\u53e3\u5c06\u6587\u4ef6\u4e0a\u4f20\u5230\u540e\u7aef\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u5c0f\u7a0b\u5e8f\u6587\u4ef6\u4e0a\u4f20\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">wx.chooseImage({<\/p>\n<p>  success: function(res) {<\/p>\n<p>    const tempFilePaths = res.tempFilePaths<\/p>\n<p>    wx.uploadFile({<\/p>\n<p>      url: &#39;https:\/\/your-server.com\/upload&#39;, \/\/ \u540e\u7aef\u4e0a\u4f20\u63a5\u53e3\u5730\u5740<\/p>\n<p>      filePath: tempFilePaths[0],<\/p>\n<p>      name: &#39;file&#39;,<\/p>\n<p>      success: function(uploadRes) {<\/p>\n<p>        console.log(&#39;File uploaded successfully:&#39;, uploadRes)<\/p>\n<p>      },<\/p>\n<p>      f<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>l: function(uploadErr) {<\/p>\n<p>        console.error(&#39;File upload failed:&#39;, uploadErr)<\/p>\n<p>      }<\/p>\n<p>    })<\/p>\n<p>  }<\/p>\n<p>})<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u4f7f\u7528<code>wx.chooseImage<\/code>\u63a5\u53e3\u9009\u62e9\u56fe\u7247\u6587\u4ef6\uff0c\u7136\u540e\u4f7f\u7528<code>wx.uploadFile<\/code>\u63a5\u53e3\u5c06\u6587\u4ef6\u4e0a\u4f20\u5230\u540e\u7aef\u670d\u52a1\u5668\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c<code>filePath<\/code>\u53c2\u6570\u4e3a\u9009\u62e9\u7684\u6587\u4ef6\u8def\u5f84\uff0c<code>name<\/code>\u53c2\u6570\u4e3a\u6587\u4ef6\u5b57\u6bb5\u540d\u79f0\uff08\u4e0e\u540e\u7aef\u4ee3\u7801\u4e2d\u7684<code>request.files[&#39;file&#39;]<\/code>\u5bf9\u5e94\uff09\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u4f18\u5316\u6587\u4ef6\u4e0a\u4f20\u8fc7\u7a0b<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u5bf9\u6587\u4ef6\u4e0a\u4f20\u8fc7\u7a0b\u8fdb\u884c\u4f18\u5316\uff0c\u5305\u62ec\uff1a\u9a8c\u8bc1\u6587\u4ef6\u7c7b\u578b\u3001\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u3001\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u4f18\u5316\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u9a8c\u8bc1\u6587\u4ef6\u7c7b\u578b<\/strong>\uff1a\u5728\u540e\u7aef\u4ee3\u7801\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u6587\u4ef6\u6269\u5c55\u540d\u6216MIME\u7c7b\u578b\u6765\u9a8c\u8bc1\u4e0a\u4f20\u6587\u4ef6\u7684\u7c7b\u578b\u3002\u4f8b\u5982\uff0c\u9650\u5236\u53ea\u5141\u8bb8\u4e0a\u4f20\u56fe\u7247\u6587\u4ef6\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">ALLOWED_EXTENSIONS = {&#39;png&#39;, &#39;jpg&#39;, &#39;jpeg&#39;, &#39;gif&#39;}<\/p>\n<p>def allowed_file(filename):<\/p>\n<p>    return &#39;.&#39; in filename and filename.rsplit(&#39;.&#39;, 1)[1].lower() in ALLOWED_EXTENSIONS<\/p>\n<p>@app.route(&#39;\/upload&#39;, methods=[&#39;POST&#39;])<\/p>\n<p>def upload_file():<\/p>\n<p>    if &#39;file&#39; not in request.files:<\/p>\n<p>        return jsonify({&quot;error&quot;: &quot;No file part&quot;}), 400<\/p>\n<p>    file = request.files[&#39;file&#39;]<\/p>\n<p>    if file.filename == &#39;&#39;:<\/p>\n<p>        return jsonify({&quot;error&quot;: &quot;No selected file&quot;}), 400<\/p>\n<p>    if file and allowed_file(file.filename):<\/p>\n<p>        filename = secure_filename(file.filename)<\/p>\n<p>        file_path = os.path.join(app.config[&#39;UPLOAD_FOLDER&#39;], filename)<\/p>\n<p>        file.save(file_path)<\/p>\n<p>        return jsonify({&quot;message&quot;: &quot;File uploaded successfully&quot;, &quot;file_path&quot;: file_path}), 200<\/p>\n<p>    else:<\/p>\n<p>        return jsonify({&quot;error&quot;: &quot;File type not allowed&quot;}), 400<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\n<p><strong>\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f<\/strong>\uff1a\u5728\u524d\u7aef\u548c\u540e\u7aef\u90fd\u53ef\u4ee5\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u7684\u5927\u5c0f\u3002\u5728\u524d\u7aef\uff0c\u53ef\u4ee5\u5728\u9009\u62e9\u6587\u4ef6\u65f6\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\uff1b\u5728\u540e\u7aef\uff0c\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e<code>MAX_CONTENT_LENGTH<\/code>\u6765\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u7684\u5927\u5c0f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20<\/strong>\uff1a\u5bf9\u4e8e\u5927\u6587\u4ef6\u4e0a\u4f20\uff0c\u53ef\u4ee5\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20\u529f\u80fd\u3002\u65ad\u70b9\u7eed\u4f20\u53ef\u4ee5\u5c06\u6587\u4ef6\u5206\u5757\u4e0a\u4f20\uff0c\u6bcf\u6b21\u4e0a\u4f20\u4e00\u4e2a\u5c0f\u5757\uff0c\u5e76\u5728\u670d\u52a1\u5668\u7aef\u5408\u5e76\u8fd9\u4e9b\u5c0f\u5757\u3002\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982<code>tus<\/code>\u6765\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u540e\u7aef\u63a5\u53d7\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4f20\u9012\u7684\u6587\u4ef6\uff0c\u5e76\u8fdb\u884c\u5904\u7406\u548c\u4fdd\u5b58\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u8fdb\u884c\u4f18\u5316\u548c\u6269\u5c55\uff0c\u4f8b\u5982\u9a8c\u8bc1\u6587\u4ef6\u7c7b\u578b\u3001\u9650\u5236\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u3001\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20\u7b49\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u60a8\u5728\u5f00\u53d1\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\u65f6\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u540e\u7aef\u5904\u7406\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7684\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u540e\u7aef\uff0c\u5904\u7406\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7684\u6587\u4ef6\u901a\u5e38\u6d89\u53ca\u5230\u4f7f\u7528Flask\u6216Django\u7b49\u6846\u67b6\u3002\u9996\u5148\uff0c\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u63a5\u6536\u6587\u4ef6\u7684API\u63a5\u53e3\u3002\u5728\u63a5\u6536\u5230\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>request.files<\/code>\u5bf9\u8c61\u6765\u8bbf\u95ee\u4e0a\u4f20\u7684\u6587\u4ef6\u6570\u636e\u3002\u786e\u4fdd\u5728\u63a5\u53e3\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8bf7\u6c42\u65b9\u6cd5\uff08\u4f8b\u5982POST\uff09\uff0c\u5e76\u5728\u5904\u7406\u6587\u4ef6\u65f6\u6ce8\u610f\u6587\u4ef6\u7684\u5b58\u50a8\u8def\u5f84\u548c\u6743\u9650\u8bbe\u7f6e\u3002<\/p>\n<p><strong>\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u6587\u4ef6\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u6743\u9650\u8bbe\u7f6e\uff1f<\/strong><br \/>\u5728\u5c0f\u7a0b\u5e8f\u4e2d\uff0c\u4e0a\u4f20\u6587\u4ef6\u9700\u8981\u7528\u6237\u6388\u6743\u8bbf\u95ee\u76f8\u5e94\u7684\u6587\u4ef6\u3002\u786e\u4fdd\u5728\u5c0f\u7a0b\u5e8f\u7684\u4ee3\u7801\u4e2d\uff0c\u9002\u5f53\u5730\u4f7f\u7528\u6743\u9650\u8bf7\u6c42API\uff0c\u63d0\u793a\u7528\u6237\u5141\u8bb8\u5c0f\u7a0b\u5e8f\u8bbf\u95ee\u4ed6\u4eec\u7684\u6587\u4ef6\u3002\u540c\u65f6\uff0c\u540e\u7aef\u4e5f\u8981\u8bbe\u7f6e\u76f8\u5e94\u7684CORS\uff08\u8de8\u57df\u8d44\u6e90\u5171\u4eab\uff09\u7b56\u7565\uff0c\u786e\u4fdd\u5c0f\u7a0b\u5e8f\u80fd\u591f\u987a\u5229\u4e0e\u540e\u7aef\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n<p><strong>\u5982\u4f55\u9a8c\u8bc1\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7684\u6587\u4ef6\u7c7b\u578b\u548c\u5927\u5c0f\uff1f<\/strong><br \/>\u4e3a\u4e86\u4fdd\u8bc1\u6587\u4ef6\u5b89\u5168\uff0c\u540e\u7aef\u9700\u8981\u5bf9\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7684\u6587\u4ef6\u7c7b\u578b\u548c\u5927\u5c0f\u8fdb\u884c\u9a8c\u8bc1\u3002\u5728\u63a5\u6536\u5230\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u68c0\u67e5\u6587\u4ef6\u7684MIME\u7c7b\u578b\u4ee5\u53ca\u6587\u4ef6\u6269\u5c55\u540d\uff0c\u786e\u4fdd\u5b83\u4eec\u7b26\u5408\u9884\u671f\u7684\u683c\u5f0f\u3002\u6b64\u5916\uff0c\u8bbe\u7f6e\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u4e5f\u662f\u5fc5\u8981\u7684\uff0c\u53ef\u4ee5\u5728\u540e\u7aef\u4ee3\u7801\u4e2d\u8fdb\u884c\u5224\u65ad\uff0c\u62d2\u7edd\u8d85\u51fa\u9650\u5236\u7684\u6587\u4ef6\u4e0a\u4f20\u8bf7\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u540e\u7aef\u63a5\u53d7\u5c0f\u7a0b\u5e8f\u4f20\u9012\u6587\u4ef6\u7684\u6838\u5fc3\u6b65\u9aa4\u5305\u62ec\uff1a\u4f7f\u7528Flask\u6846\u67b6\u3001\u8bbe\u7f6e\u6587\u4ef6\u4e0a\u4f20\u8def\u5f84\u3001\u4f7f\u7528request\u5bf9\u8c61 [&hellip;]","protected":false},"author":3,"featured_media":1083982,"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\/1083978"}],"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=1083978"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1083978\/revisions"}],"predecessor-version":[{"id":1083983,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1083978\/revisions\/1083983"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1083982"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1083978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1083978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1083978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}