我正在尝试使以下链接正常工作: http://localhost:8001/name/jason/grey
和路线定义:
{"/name/([a-zA-Z]+)/([a-zA-Z]+)", [{controller, "stuff"}, {action, "getStudentNames"}, [{firstname, '$1'}, {lastname, '$2'}]]}.
然后在我的控制器中
getStudentNames('GET', [FirstName, LastName])->
{output, "ok"}.
我收到以下错误消息
CRASH REPORT Process <0.313.0> with 0 neighbours exited with reason: no function clause matching boss_router_controller:'-index_and_extract_params/1-fun-0-'([{firstname,'$1'},{lastname,'$2'}], []) line 258 in gen_server:terminate/7 line 812
似乎我的路线定义不正确,有什么帮助吗?