Comments (2)
I can't reproduce
curl --data "foo=bar" localhost:5050/login
yields this output
$ bundle e puma -p 5050
Puma starting in single mode...
* Puma version: 6.4.2 (ruby 3.2.2-p53) ("The Eagle of Durango")
* Min threads: 0
* Max threads: 5
* Environment: development
* PID: 60360
* Listening on http://0.0.0.0:5050
Use Ctrl-C to stop
POST /login
params
{"foo"=>"bar"}
127.0.0.1 - - [23/Jan/2024:11:10:50 +0100] "POST /login HTTP/1.1" 200 - 0.0008
$ cat -n Gemfile Gemfile.lock app.rb config.ru
1 # frozen_string_literal: true
2
3 source "https://rubygems.org"
4
5 # gem "rails"
6
7 gem "sinatra", "~> 4.0"
8
9 gem "puma", "~> 6.4"
1 GEM
2 remote: https://rubygems.org/
3 specs:
4 base64 (0.2.0)
5 mustermann (3.0.0)
6 ruby2_keywords (~> 0.0.1)
7 nio4r (2.7.0)
8 puma (6.4.2)
9 nio4r (~> 2.0)
10 rack (3.0.8)
11 rack-protection (4.0.0)
12 base64 (>= 0.1.0)
13 rack (>= 3.0.0, < 4)
14 rack-session (2.0.0)
15 rack (>= 3.0.0)
16 ruby2_keywords (0.0.5)
17 sinatra (4.0.0)
18 mustermann (~> 3.0)
19 rack (>= 3.0.0, < 4)
20 rack-protection (= 4.0.0)
21 rack-session (>= 2.0.0, < 3)
22 tilt (~> 2.0)
23 tilt (2.3.0)
24
25 PLATFORMS
26 x86_64-darwin-21
27
28 DEPENDENCIES
29 puma (~> 6.4)
30 sinatra (~> 4.0)
31
32 BUNDLED WITH
33 2.4.22
1 require "sinatra"
2 post "/login" do
3 puts 'POST /login' # ==> POST /login
4 puts 'params' unless params.empty?
5 puts 'no params' if params.empty? # ==> no params
6 puts params # ==> {}
7 end
1 require_relative "app"
2 run Sinatra::Application
from sinatra.
Ya all kinds of things have gone wrong so I'm taking a new approach. I'll close.
from sinatra.
Related Issues (20)
- Release 3.2.0
- Remove references to the `sysrandom` gem from the README
- rackup command fails with Sinatra app in ruby 3.3.0-rc1
- Classic Style Application without a `config.ru` does not work with Ruby 3.3 and Bundler 2.5 HOT 9
- Address warnings seen when running rack-protection tests
- Release 4.0
- Failing tests with ruby-head HOT 7
- rack-protection: addition of "base64" as a dependency conflicts with passenger HOT 7
- Raise `required_ruby_version` to 2.7.8
- Route Middleware
- With Sinatra 4/Rack3, now requires "request.body.rewind"
- Upgrading to 4.0.0 required me to do a new request.body.rewind before a request.body.read HOT 2
- I made a template for Sinatra if you guys wanna include it in examples
- paradise lost, also, stability (GETTING STARTED does NOT) HOT 4
- Segmentation Fault with 4.0.0 HOT 5
- sinatra-contrib tests fails on truffleruby 24.0.0 HOT 6
- Support `Forwarded` header HOT 1
- Default rack-protection reaction `drop_session` harmful?
- Some `RoutingTest` fails with rack head (Rack 3.1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sinatra.