Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7585987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:18:43+00:00 2026-05-30T19:18:43+00:00

This is a simple enough one but I’ve tried everything that makes sense to

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:18:44+00:00Added an answer on May 30, 2026 at 7:18 pm

    Let me help you with Sinatra, my friend 🙂

    ruby -r sinatra -e "post('/postMan/:someParam'){puts params[:someParam]; puts params[:otherParam]}"
    

    and on the curl side:

    curl -I -X POST http://127.0.0.1:4567/postMan/123456?otherParam=12
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This probably has a simple answer, but I must not have had enough coffee
This should be simple enough, but somehow my brain stopped working. I have two
This should be simple enough. Here's my one line of code that's giving me
Sounds simple enough...but I've been plugging away at this, trying to find the one
Ok i just don't have enough knowledge for this simple script apparently. Basically, in
This should seem simple enough, but can't figure it out. I was porting a
Very inexperienced with Flash, but I hope this is simple enough for someone to
This one is probably a simple one, but I could not find an example
This sounds like a simple enough question, but can't find the answer for the
Consider the following table with a constraint that's a bit daft but simple enough

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.