ejabberd - Comments for "extend http-bind to support JSON syntax" https://www.ejabberd.im/node/2801 en You can ask the author. https://www.ejabberd.im/node/2801#comment-51683 <div class="quote-msg"> <div class="quote-author"><em>Anonymous</em> wrote:</div> <p>Do you plan to support the JSON syntax in the future?</p></div> <p>ejabberd's http_bind code was implemented by <noindex><a href="http://zeank.in-berlin.de/" rel="nofollow" >Stefan Strigler</a></noindex> (the author of <noindex><a href="http://jwchat.sourceforge.net/" rel="nofollow" >JWChat</a></noindex>, MUCkl...), and was sponsored by <noindex><a href="http://www.mabber.com/" rel="nofollow" >Mabber</a></noindex>. You can ask him.</p> <div class="quote-msg"> <div class="quote-author"><em>Anonymous</em> wrote:</div> <p>I need to extend the http-bind module to support JSON(javascript) syntax.<br /> Basically, I need ejabberd to listen to a GET request and reply with JSON syntax which is the same as returning a javascript file.</p> <p>Is the right way to do it is using the ejabberd HTTP request handlers?</p></div> <p>If you take a look at the code, mod_http_bind uses the request handler: if it receives a POST, it calls ejabberd_http_bind. If it receives a GET, it returns a simple HTML page.</p> <p>If you want the same URI .../http-bind/ to serve both HTTP-Bind and your JSON stuff, then you need to extend the existing mod_http_bind file.</p> <p>However, if you want that your JSON stuff is served in another URI, like .../http-json/, then you don't need to modify the existing code at all. You can simply write a new ejabberd module, with a new request handler, etc. Of course, you can copy existing code to your module if that helps you.</p> Sat, 26 Jan 2008 01:10:15 +0000 mfoss comment 51683 at https://www.ejabberd.im