Question

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?

Was it helpful?

Solution

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'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top