This is a simple enough one but I’ve tried everything that makes sense to me.
Basically I have a Sinatra app and with a curl post, am trying to pass in multiple values.
This is the curl post that needs to be accepted:
curl -I -X POST http://127.0.0.1:4567/simplepost/123?value=abc
And Heres what I have on the sinatra side
require 'rubygems'
require 'sinatra/base'
class Go< Sinatra::Base
#post '/simplepost/:param1:param2' do
#post '/simplepost/:param1 ?value= :param2' do
post '/simplepost/:param1?value=:param2' do
#post '/simplepost/:param1?:param2' do
puts params[:param1]
puts params[:param2]
end
end
Go.run!
Sadly, each one of these returns a different type of result. Some are 404’s, some are
12,3
where 12 is param1 and 3 is param2.
Can anyone help me figure out what kind of route I need to add to sinatra to break that curl post into 2 params?
Let me help you with Sinatra, my friend 🙂
and on the curl side: