beepbeep icon indicating copy to clipboard operation
beepbeep copied to clipboard

Application broke and not working when beepbeep_args:get_param is called

Open sendtopms opened this issue 15 years ago • 4 comments

I tried small example with latest code ewgi enabled beepbeep. But I am not able run it.

It is broke when there is a call to beepbeep_args:get_param. It is simple to reproduce

  1. Create a new beepbeep app
  2. open home_controller.erl and add
    Name = beepbeep_args:get_param("name",Env), then
  3. make
  4. start the server
  5. http://localhost:8000/?name=Senthil

It cries with =ERROR REPORT==== 11-Aug-2009::23:23:09 === function_clause

sendtopms avatar Aug 12 '09 04:08 sendtopms

I have exactly the same problem. Any try of using beepbeep_args module gives the same error.

ghost avatar Aug 12 '09 10:08 ghost

ok, it happens as in Env is {ewgi_context, ... } and not parameter list

ghost avatar Aug 12 '09 10:08 ghost

getting post data with the following statement also did not work. PostData = ewgi_api:remote_user_data(Env),

ghost avatar Aug 12 '09 11:08 ghost

Yah, I have something of a fix for this in my branch (github.com/lethain/beepbeep), although it involves populating the uri parameters via a uri_param_middleware and consequently moves beepbeep_args:get_param/2 to uri_param_middleware:get_param/2 .

lethain avatar Sep 23 '09 02:09 lethain