Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3341 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 23
2066
0
sep. 23
1813
2
jun. 25
11293
6
okt. 23
22139
3
mrt. 24
9558