Odoo Help

0

Remove JsonRPC from response

By
shubham
on 5/16/18, 9:29 AM 122 views

Hello,

I am trying to remove this parameter to this jsonrpc resultjsonrpc result

{

  "jsonrpc": "2.0",

  "result": {

    "source": "webhook",

    "speech": "hello my name is shubham",

    "displayText": "hello testing"

  }

  "id": "f2f0cca0-1f91-4e8f-b264-74e30dc457e9"

}

i need simple one object result like:

{

  "speech": "hello my name is shubham",

  "displayText": "hello testing",

  "source": "webhook"

}


so please help me with additional parameters


here is my controller code

  @ http.route ('/ userappoint / webhook_test /', type = 'json', auth = 'public', method = ['POST'], csrf = False, website = True)

    def webhook_test (self, ** kw):

      response = {

            'speech': 'hello my name is shubham',

            'displayText': 'hello testing',

            'source': 'webhook'

        }

        return response


You should format your question with proper coding syntax

Hilar AK
on 5/16/18, 10:07 AM

here is my Code :

@ http.route ('/ userappoint / webhook_test /', type = 'json', auth = 'public', method = ['POST'], csrf = False, website = True)

def webhook_test (self, ** kw):

response = {

'speech': 'hello my name is shubham',

'displayText': 'hello testing',

'source': 'webhook'

}

return response

how I remove additional JSON-RPC parameters in result

shubham
on 5/16/18, 10:15 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 5/16/18, 9:29 AM
Seen: 122 times
Last updated: 5/16/18, 10:07 AM