Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
1398 Visualizações

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?

Avatar
Cancelar
Autor

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

Autor Melhor resposta

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

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
jul. 23
6463
0
nov. 22
2573
0
dez. 24
1168
0
jan. 23
2268
2
abr. 22
10698