문제

I basically want to write a POST request in sinatra that has to take 3 links at the same time and process it in someway.

post account/:id/

Here id represents the user id...what will come after

:id/

so that I can capture 3 links like link1, link2, link3 and then do something with it inside the POST request?

도움이 되었습니까?

해결책

Doing this with interpolated path variables is very inflexible. Rather do it by accepting a posted array of parameters

If you absolutely have to do this; the syntax is something like

post 'account/:id/link1/:link1/link2/:link2/link3/:link3'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top