Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3368 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Sep 23
2099
0
Sep 23
1834
2
Jun 25
11323
6
Okt 23
22197
3
Mar 24
9588