erlang - Making an HTTP GET request from ejabberd mod_register -


i have setup ejabberd server. when user registers need make request server notify of user registration. url is:

http://localhost:2555/registration?reg=true&id=xyz 

how make request within mod_register module in ejabberd config file? mod_register follows:

 {mod_register, [           {welcome_message, {"welcome!",                       "welcome jabber server."}},           {access, register}               //get request          ]} 

i guess looking solution involving programming in erlang.

  1. you can patch ejabberd's mod_register directly @ point registration successful. see example send_registration_notifications/2. quick , dirty, not work accross ejabberd upgrades.

  2. you can configure ejabberd's mod_register send registration notifications option registration_watchers bot, , design such xmpp bot access url whenever receives these notifications. use exmpp starting point. provide tutorial write bot.

to access url erlang, easiest use built-in http client, , in particular httpc:request/1.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -