Thanks for your resposne. I found the problem.
It is in trailing slash in the url.

Here is the route file:

{"/action", [{application, fast_cp}, {controller, 
"fast_cp_some_controller"}, {action, "index"}]}.

If I enter /action/ then it's ok.
however /action raise exception

On Sunday, September 7, 2014 9:53:43 AM UTC+4, Dmitry Polyanovsky wrote:
>
> Hi,
> you should call host/controller/action and not just host/action
>
> also, for better understanding you  need to show your routes file
>
>
> On Sun, Sep 7, 2014 at 3:21 AM, <[email protected] <javascript:>> wrote:
>
>> Command:
>> curl -H POST -d @file localhost:8001/action
>>
>> controller is:
>> index('POST', []) ->
>>   ok.
>>
>> I ger error:
>> 04:17:14.974 [error] gen_server <0.282.0> terminated with reason: bad 
>> argument in call to erlang:list_to_atom(undefined) in 
>> boss_router_controller:route/2 line 174
>>
>> This line is 
>> ControllerModule = list_to_atom(boss_files:web_controller(App, C, 
>> State#state.controllers)),
>>
>> and this: boss_files:web_controller(App, C, State#state.controllers)
>> actually return undefined
>>
>> Any idea how to fix it?
>> Thanks
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "ChicagoBoss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> Visit this group at http://groups.google.com/group/chicagoboss.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/chicagoboss/8c20f826-27c5-487d-bbbe-9bd3c3d70fbc%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/chicagoboss/8c20f826-27c5-487d-bbbe-9bd3c3d70fbc%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/559c519d-b456-449e-8db7-781556626b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to