mod_rest doesn't respond

Here is my config:

 {mod_rest, [ {allowed_ips, [ {127,0,0,1} ]} ]},
  {5280, ejabberd_http, [
                         {request_handlers,
                          [
                           {["rest"], mod_rest}
...

when I post

    wget http://127.0.0.1:5280/rest/ --server-response --post-data 'World'
    --2013-02-19 08:27:25--  http://127.0.0.1:5280/rest/
    Connecting to 127.0.0.1:5280... connected.
    HTTP request sent, awaiting response... No data received.
    Retrying.

    --2013-02-19 08:27:26--  (try: 2)  http://127.0.0.1:5280/rest/
    Connecting to 127.0.0.1:5280... connected.
    HTTP request sent, awaiting response... No data received.
    Retrying.

Here's the ejabberd.log

    I(<0.357.0>:ejabberd_listener:281) : (#Port<0.3943>) Accepted connection     
    {{127,0,0,1},32993} -> {{127,0,0,1},5280}

    =INFO REPORT==== 2013-02-19 08:27:28 ===
    I(<0.434.0>:ejabberd_http:146) : started: {gen_tcp,#Port<0.3943>}

    =INFO REPORT==== 2013-02-19 08:27:31 ===
    I(<0.357.0>:ejabberd_listener:281) : (#Port<0.3944>) Accepted connection 
    {{127,0,0,1},32994} -> {{127,0,0,1},5280}

And when I go to the page :5280/rest, the page says:Try POSTing a stanza.

Everything looks find but I can't get response. I tried other command with no luck...

Any idea will be appreciate!!!

Maybe it's a problem with the

Maybe it's a problem with the domain name. If you have

{hosts, ["localhost"]}.

Then make a request like this::

$ wget http://localhost:5280/rest/ --server-response --post-data 'World'
--2013-02-20 17:40:40--  http://localhost:5280/rest/
Resolviendo localhost (localhost)... 127.0.0.1
Conectando con localhost (localhost)[127.0.0.1]:5280... conectado.
Petición HTTP enviada, esperando respuesta... 
  HTTP/1.1 200 OK
  Content-Type: text/html; charset=utf-8
  Content-Length: 33
Longitud: 33 [text/html]
Grabando a: “index.html.1”

100%[=========================================================>] 33          --.-K/s   en 0s      

2013-02-20 17:40:40 (1,40 MB/s) - “index.html.1” guardado [33/33]

Are you using a recent ejabberd version (like 2.1.11) and recent mod_rest?

Hi, I have the same problem.

Hi, I have the same problem. But in the log, there's 1 more row:

=INFO REPORT==== 2013-03-08 07:02:53 ===
I(<0.404.0>:ejabberd_listener:281) : (#Port<0.3791>) Accepted connection {{127,0,0,1},42142} -> {{127,0,0,1},5280}

=INFO REPORT==== 2013-03-08 07:02:53 ===
D(<0.411.0>:ejabberd_http:142) : S: [{["rest"],mod_rest},
                                     {["captcha"],ejabberd_captcha},
                                     {["admin"],ejabberd_web_admin},
                                     {["http-bind"],mod_http_bind},
                                     {["http-poll"],ejabberd_http_poll}]


=INFO REPORT==== 2013-03-08 07:02:53 ===
I(<0.411.0>:ejabberd_http:146) : started: {gen_tcp,#Port<0.3791>}

=INFO REPORT==== 2013-03-08 07:02:53 ===
D(<0.411.0>:ejabberd_http:268) : (#Port<0.3791>) http query: 'POST' /rest/


=INFO REPORT==== 2013-03-08 07:02:53 ===
D(<0.411.0>:ejabberd_http:447) : client data: "World"


=INFO REPORT==== 2013-03-08 07:02:53 ===
D(<0.411.0>:ejabberd_http:346) : ["rest"] matches ["rest"]

But after that, it went silent and no response back.

My config are as simple as the readme:

{mod_rest, [{allowed_ips, [{127,0,0,1}]}]}

{5280, ejabberd_http [
                      {request_handlers,
                       [
                        {["rest"], mod_rest}

Can somebody help, many thanks.

Syndicate content