跳至内容
菜单
此问题已终结
1 回复
1243 查看

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
6253
0
11月 22
2460
0
12月 24
1039
0
1月 23
2169
2
4月 22
10484