Skip to Content
Menú
This question has been flagged
1 Respondre
3333 Vistes

Hi.

Is it possible for a custom module to listen on a specific URL  (eg www.myodooserver.com/listentothis) for post requests (from another API)  or would this have to be done via nginx and another python script?

Avatar
Descartar
Best Answer

Yes, you can do it by creating an http.Controller class, like:

from openerp import http

class Home(http.Controller):

@http.route('/listentothis', type='http', auth="none")

def index(self):

return "hello world"

Know more read here:

http://www.odoo.com/documentation/9.0/reference/http.html

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de set. 23
2058
0
de set. 23
1802
2
de juny 25
11292
6
d’oct. 23
22133
3
de març 24
9556