Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3360 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
set 23
2073
0
set 23
1817
2
giu 25
11303
6
ott 23
22157
3
mar 24
9562