{"id":1084513,"date":"2025-01-08T13:08:02","date_gmt":"2025-01-08T05:08:02","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1084513.html"},"modified":"2025-01-08T13:08:04","modified_gmt":"2025-01-08T05:08:04","slug":"python%e5%a6%82%e4%bd%95%e8%bf%94%e5%9b%9e%e4%b8%80%e4%b8%aa404%e5%93%8d%e5%ba%94-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1084513.html","title":{"rendered":"Python\u5982\u4f55\u8fd4\u56de\u4e00\u4e2a404\u54cd\u5e94"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24194837\/af1cb7b1-ee92-4dbb-92f4-212ee8f8513f.webp\" alt=\"Python\u5982\u4f55\u8fd4\u56de\u4e00\u4e2a404\u54cd\u5e94\" \/><\/p>\n<p><p> <strong>Python\u8fd4\u56de\u4e00\u4e2a404\u54cd\u5e94\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u3001FastAPI\u7b49\u6846\u67b6\u3002\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528Flask\u6846\u67b6\uff0c\u901a\u8fc7<code>abort<\/code>\u51fd\u6570\u3001\u8bbe\u7f6e\u54cd\u5e94\u72b6\u6001\u7801\u3001\u521b\u5efa\u81ea\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u51fd\u6570\u6765\u5b9e\u73b0\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u8fd4\u56de\u4e00\u4e2a404\u54cd\u5e94\uff0c\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u3001FastAPI\u6846\u67b6\u7684\u65b9\u6cd5\u3002\u6211\u4eec\u8fd8\u5c06\u63a2\u8ba8\u5982\u4f55\u81ea\u5b9a\u4e49404\u9519\u8bef\u9875\u9762\uff0c\u4ee5\u53ca\u5982\u4f55\u5728API\u4e2d\u8fd4\u56de404\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Flask\u8fd4\u56de404\u54cd\u5e94<\/h3>\n<\/p>\n<p><h4>1\u3001\u901a\u8fc7<code>abort<\/code>\u51fd\u6570\u8fd4\u56de404\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>Flask\u6846\u67b6\u63d0\u4f9b\u4e86\u4e00\u4e2a\u975e\u5e38\u65b9\u4fbf\u7684<code>abort<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u6765\u8fd4\u56de\u5404\u79cdHTTP\u9519\u8bef\u54cd\u5e94\u3002\u8981\u8fd4\u56de404\u54cd\u5e94\uff0c\u53ea\u9700\u8c03\u7528<code>abort(404)<\/code>\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, abort<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#39;\/some_route&#39;)<\/p>\n<p>def some_route():<\/p>\n<p>    abort(404)<\/p>\n<p>if __name__ == &#39;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u8bbe\u7f6e\u54cd\u5e94\u72b6\u6001\u7801\u8fd4\u56de404\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528<code>abort<\/code>\u51fd\u6570\u5916\uff0c\u8fd8\u53ef\u4ee5\u624b\u52a8\u8bbe\u7f6e\u54cd\u5e94\u5bf9\u8c61\u7684\u72b6\u6001\u7801\u4e3a404\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, Response<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#39;\/another_route&#39;)<\/p>\n<p>def another_route():<\/p>\n<p>    return Response(&#39;Not Found&#39;, status=404)<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u81ea\u5b9a\u4e49404\u9519\u8bef\u5904\u7406\u51fd\u6570<\/h4>\n<\/p>\n<p><p>Flask\u5141\u8bb8\u6211\u4eec\u81ea\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u51fd\u6570\uff0c\u4ee5\u4fbf\u5728\u8fd4\u56de404\u54cd\u5e94\u65f6\u663e\u793a\u81ea\u5b9a\u4e49\u9875\u9762\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, render_template<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.errorhandler(404)<\/p>\n<p>def page_not_found(e):<\/p>\n<p>    return render_template(&#39;404.html&#39;), 404<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528Django\u8fd4\u56de404\u54cd\u5e94<\/h3>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528<code>HttpResponseNotFound<\/code>\u8fd4\u56de404\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>\u5728Django\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>HttpResponseNotFound<\/code>\u7c7b\u8fd4\u56de404\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from django.http import HttpResponseNotFound<\/p>\n<p>def some_view(request):<\/p>\n<p>    return HttpResponseNotFound(&#39;&lt;h1&gt;Page not found&lt;\/h1&gt;&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528<code>get_object_or_404<\/code>\u8fd4\u56de404\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>Django\u63d0\u4f9b\u4e86\u4e00\u4e2a\u975e\u5e38\u65b9\u4fbf\u7684<code>get_object_or_404<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u6765\u5728\u5bf9\u8c61\u4e0d\u5b58\u5728\u65f6\u81ea\u52a8\u8fd4\u56de404\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from django.shortcuts import get_object_or_404<\/p>\n<p>from .models import MyModel<\/p>\n<p>def another_view(request, pk):<\/p>\n<p>    obj = get_object_or_404(MyModel, pk=pk)<\/p>\n<p>    # \u5904\u7406\u5bf9\u8c61<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u81ea\u5b9a\u4e49404\u9519\u8bef\u9875\u9762<\/h4>\n<\/p>\n<p><p>\u5728Django\u4e2d\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684404\u9519\u8bef\u9875\u9762\u3002\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>404.html<\/code>\u7684\u6a21\u677f\u6587\u4ef6\uff0c\u7136\u540e\u5728<code>urls.py<\/code>\u4e2d\u914d\u7f6e404\u9519\u8bef\u5904\u7406\u89c6\u56fe\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5728templates\u76ee\u5f55\u4e0b\u521b\u5efa404.html\u6587\u4ef6<\/p>\n<h2><strong>urls.py<\/strong><\/h2>\n<p>from django.conf.urls import handler404<\/p>\n<p>handler404 = &#39;myapp.views.custom_404_view&#39;<\/p>\n<h2><strong>views.py<\/strong><\/h2>\n<p>from django.shortcuts import render<\/p>\n<p>def custom_404_view(request, exception):<\/p>\n<p>    return render(request, &#39;404.html&#39;, status=404)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528FastAPI\u8fd4\u56de404\u54cd\u5e94<\/h3>\n<\/p>\n<p><h4>1\u3001\u901a\u8fc7<code>HTTPException<\/code>\u8fd4\u56de404\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>\u5728FastAPI\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>HTTPException<\/code>\u7c7b\u8fd4\u56de404\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from fastapi import FastAPI, HTTPException<\/p>\n<p>app = FastAPI()<\/p>\n<p>@app.get(&#39;\/some_route&#39;)<\/p>\n<p>def some_route():<\/p>\n<p>    raise HTTPException(status_code=404, detail=&quot;Not Found&quot;)<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    import uvicorn<\/p>\n<p>    uvicorn.run(app, host=&#39;0.0.0.0&#39;, port=8000)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u81ea\u5b9a\u4e49404\u9519\u8bef\u5904\u7406\u51fd\u6570<\/h4>\n<\/p>\n<p><p>FastAPI\u5141\u8bb8\u6211\u4eec\u81ea\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u51fd\u6570\uff0c\u4ee5\u4fbf\u5728\u8fd4\u56de404\u54cd\u5e94\u65f6\u663e\u793a\u81ea\u5b9a\u4e49\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from fastapi import FastAPI, Request<\/p>\n<p>from fastapi.responses import JSONResponse<\/p>\n<p>app = FastAPI()<\/p>\n<p>@app.exception_handler(404)<\/p>\n<p>async def custom_404_handler(request: Request, exc):<\/p>\n<p>    return JSONResponse(<\/p>\n<p>        status_code=404,<\/p>\n<p>        content={&quot;message&quot;: &quot;Oops! The resource was not found.&quot;},<\/p>\n<p>    )<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    import uvicorn<\/p>\n<p>    uvicorn.run(app, host=&#39;0.0.0.0&#39;, port=8000)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5728API\u4e2d\u8fd4\u56de404\u54cd\u5e94<\/h3>\n<\/p>\n<p><p>\u5728API\u5f00\u53d1\u4e2d\uff0c\u8fd4\u56de404\u54cd\u5e94\u901a\u5e38\u7528\u4e8e\u8d44\u6e90\u672a\u627e\u5230\u7684\u60c5\u51b5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u573a\u666f\u548c\u5b9e\u73b0\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u8d44\u6e90\u672a\u627e\u5230<\/h4>\n<\/p>\n<p><p>\u5728RESTful API\u4e2d\uff0c\u5982\u679c\u5ba2\u6237\u7aef\u8bf7\u6c42\u7684\u8d44\u6e90\u4e0d\u5b58\u5728\uff0c\u670d\u52a1\u5668\u5e94\u8fd4\u56de404\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, jsonify, abort<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>resources = {<\/p>\n<p>    &#39;1&#39;: {&#39;name&#39;: &#39;Resource 1&#39;},<\/p>\n<p>    &#39;2&#39;: {&#39;name&#39;: &#39;Resource 2&#39;},<\/p>\n<p>}<\/p>\n<p>@app.route(&#39;\/resource\/&lt;resource_id&gt;&#39;)<\/p>\n<p>def get_resource(resource_id):<\/p>\n<p>    if resource_id not in resources:<\/p>\n<p>        abort(404)<\/p>\n<p>    return jsonify(resources[resource_id])<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u65e0\u6548\u7684URL<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5ba2\u6237\u7aef\u8bf7\u6c42\u4e86\u4e00\u4e2a\u65e0\u6548\u7684URL\uff0c\u670d\u52a1\u5668\u5e94\u8fd4\u56de404\u54cd\u5e94\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from fastapi import FastAPI, HTTPException<\/p>\n<p>app = FastAPI()<\/p>\n<p>@app.get(&#39;\/valid_route&#39;)<\/p>\n<p>def valid_route():<\/p>\n<p>    return {&quot;message&quot;: &quot;This is a valid route&quot;}<\/p>\n<p>@app.get(&#39;\/invalid_route&#39;)<\/p>\n<p>def invalid_route():<\/p>\n<p>    raise HTTPException(status_code=404, detail=&quot;Invalid URL&quot;)<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    import uvicorn<\/p>\n<p>    uvicorn.run(app, host=&#39;0.0.0.0&#39;, port=8000)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u81ea\u5b9a\u4e49API\u9519\u8bef\u6d88\u606f<\/h4>\n<\/p>\n<p><p>\u5728API\u4e2d\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49404\u9519\u8bef\u6d88\u606f\uff0c\u4ee5\u63d0\u4f9b\u66f4\u53cb\u597d\u7684\u9519\u8bef\u63d0\u793a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, jsonify, abort<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.errorhandler(404)<\/p>\n<p>def custom_404_error(e):<\/p>\n<p>    return jsonify(error=&quot;Resource not found&quot;), 404<\/p>\n<p>if __name__ == &#39;__main__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728Python\u4e2d\u8fd4\u56de404\u54cd\u5e94\uff0c\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u3001FastAPI\u7b49\u6846\u67b6\u7684\u65b9\u6cd5\u3002\u6211\u4eec\u8fd8\u63a2\u8ba8\u4e86\u5982\u4f55\u81ea\u5b9a\u4e49404\u9519\u8bef\u9875\u9762\uff0c\u4ee5\u53ca\u5982\u4f55\u5728API\u4e2d\u8fd4\u56de404\u54cd\u5e94\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u7075\u6d3b\u5730\u5904\u7406404\u9519\u8bef\uff0c\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\u3002\u65e0\u8bba\u662fWeb\u5e94\u7528\u8fd8\u662fAPI\uff0c\u6b63\u786e\u5904\u7406404\u9519\u8bef\u90fd\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u8bf7\u6c42\u5931\u8d25\u7684\u539f\u56e0\uff0c\u5e76\u5f15\u5bfc\u4ed6\u4eec\u5230\u6b63\u786e\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406404\u9519\u8bef\uff1f<\/strong><br \/>\u5728Python\u4e2d\u5904\u7406404\u9519\u8bef\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Flask\u6216Django\u7b49Web\u6846\u67b6\u6765\u5b9e\u73b0\u3002\u5f53\u8bf7\u6c42\u7684\u8d44\u6e90\u4e0d\u5b58\u5728\u65f6\uff0c\u6846\u67b6\u80fd\u591f\u81ea\u52a8\u6355\u6349\u5230\u8fd9\u4e2a\u60c5\u51b5\u5e76\u8fd4\u56de\u4e00\u4e2a404\u54cd\u5e94\u3002\u4f60\u53ef\u4ee5\u81ea\u5b9a\u4e49404\u9519\u8bef\u9875\u9762\uff0c\u4ee5\u63d0\u4f9b\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p><strong>\u4f7f\u7528Flask\u6846\u67b6\u5982\u4f55\u8fd4\u56de404\u54cd\u5e94\uff1f<\/strong><br \/>\u5728Flask\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>abort<\/code>\u51fd\u6570\u6765\u8fd4\u56de404\u54cd\u5e94\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>abort(404)<\/code>\u53ef\u4ee5\u7acb\u5373\u8fd4\u56de404\u72b6\u6001\u7801\u3002\u6b64\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2a\u9519\u8bef\u5904\u7406\u51fd\u6570\u6765\u5904\u7406404\u9519\u8bef\uff0c\u8fd4\u56de\u81ea\u5b9a\u4e49\u7684\u9519\u8bef\u9875\u9762\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<pre><code class=\"language-python\">from flask import Flask, abort\n\napp = Flask(__name__)\n\n@app.route(&#39;\/&lt;path&gt;&#39;)\ndef index(path):\n    if path != &#39;valid_path&#39;:\n        abort(404)\n    return &#39;Valid Path!&#39;\n\n@app.errorhandler(404)\ndef not_found(e):\n    return &#39;This page does not exist.&#39;, 404\n<\/code><\/pre>\n<p><strong>Django\u4e2d\u5982\u4f55\u81ea\u5b9a\u4e49404\u9875\u9762\uff1f<\/strong><br \/>\u5728Django\u4e2d\uff0c\u521b\u5efa\u81ea\u5b9a\u4e49\u7684404\u54cd\u5e94\u9700\u8981\u5728\u9879\u76ee\u4e2d\u8bbe\u7f6e404.html\u6a21\u677f\u3002\u5f53\u7528\u6237\u8bbf\u95ee\u4e0d\u5b58\u5728\u7684\u9875\u9762\u65f6\uff0cDjango\u4f1a\u81ea\u52a8\u67e5\u627e\u8fd9\u4e2a\u6a21\u677f\u5e76\u8fd4\u56de\u3002\u5982\u679c\u60f3\u8981\u5728\u89c6\u56fe\u4e2d\u624b\u52a8\u8fd4\u56de404\uff0c\u53ef\u4ee5\u4f7f\u7528<code>HttpResponseNotFound<\/code>\u7c7b\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">from django.http import HttpResponseNotFound\n\ndef my_view(request):\n    # \u903b\u8f91\u5904\u7406\n    return HttpResponseNotFound(&#39;This page does not exist.&#39;)\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u8c03\u8bd5Python\u5e94\u7528\u4e2d\u7684404\u9519\u8bef\uff1f<\/strong><br \/>\u8c03\u8bd5404\u9519\u8bef\u65f6\uff0c\u53ef\u4ee5\u67e5\u770b\u670d\u52a1\u5668\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u627e\u51fa\u8bf7\u6c42\u7684URL\u548c\u76f8\u5173\u7684\u9519\u8bef\u4fe1\u606f\u3002\u6b64\u5916\uff0c\u786e\u4fdd\u4f60\u7684\u8def\u7531\u914d\u7f6e\u6b63\u786e\uff0c\u8def\u5f84\u662f\u5426\u5b58\u5728\u62fc\u5199\u9519\u8bef\u6216\u7f3a\u5c11\u5fc5\u8981\u7684\u89c6\u56fe\u51fd\u6570\u3002\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177\u6216IDE\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\u6240\u5728\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u8fd4\u56de\u4e00\u4e2a404\u54cd\u5e94\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Flask\u3001Django\u3001FastAPI\u7b49\u6846\u67b6\u3002\u6700 [&hellip;]","protected":false},"author":3,"featured_media":1084523,"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\/1084513"}],"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=1084513"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1084513\/revisions"}],"predecessor-version":[{"id":1084524,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1084513\/revisions\/1084524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1084523"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1084513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1084513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1084513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}