コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1259 ビュー

My Code:

from odoo import http
from odoo.http import request

class CustomController(http.Controller):

​@http.route("/test/validate", type="json", auth="public", website=False, methods["POST"])​
​def custom_api(self):
​body = {'decision': 'reject'}
​return request.make_json_response(body)

Output:

{
​"jsonrpc": "2.0",
​"id": null,
​"result": ""
}


I need to only send the raw JSON response and not the RPC response.

{
​'decision': 'reject'
}

How to do this?

アバター
破棄
著作者

Response:
{
"jsonrpc": "2.0",
"id": null,
"result": "<Response 22 bytes [200 OK]>"
}

著作者 最善の回答

Response Got: { "jsonrpc": "2.0", "id": null, "result": ""}

アバター
破棄
関連投稿 返信 ビュー 活動
2
7月 23
6278
0
11月 22
2472
0
12月 24
1067
0
1月 23
2176
2
4月 22
10514