I have this route in my Sinatra app:
post ':type/new' do
data = JSON.parse request.body.read
id = $database.add_instance(params[:type], data['content'])
id.to_json
end
Now when I post to /wombat/new it returns a 404, recommending that I add post '/wombat/new' to my routes.
Why isn’t it matching that route?
Try
(note the leading
/).