0xSina
0xSina

Reputation: 21573

Sinatra only recognizing first GET param

I have a simple Sinatra app. When I do:

curl localhost:4567/api/shows?limit=1&page=2

I only see this in the Sinatra log:

{"limit"=>"1"}

What am I doing wrong?

Upvotes: 0

Views: 75

Answers (1)

0xSina
0xSina

Reputation: 21573

I need quotes around the url in curl. So it would be:

curl 'localhost:4567/api/shows?limit=1&page=2'

Reason: & means run whatever you typed before it as a command in the background, that's why it wasn't working.

Upvotes: 2

Related Questions