我如何路径不同的网址:" some.host/prefix/params/params"和" some.host/prefix/params/params/123" ?
我试试这个:
get {
path ("prefix" / Segments) { ss => complete (ss) }
path ("prefix" / Segments / IntNumber) { (ss, num) => complete (num)}
}
但(ss, num) => complete (num)
从未执行过。
像Segments / «i» ~ IntNumber ~ PathEnd
那样欺骗网址" some.host/prefix/params/params/i123"也不干了。