Skip to content

Commit a5bc2fd

Browse files
committed
something different'
1 parent b85fafe commit a5bc2fd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app.rb

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
require 'sinatra/base'
22

33
class App < Sinatra::Base
4-
before do
5-
puts "body=#{request.body.read}"
6-
end
7-
84
get '/get' do
95
'OK'
106
end
117

128
post '/post' do
13-
request.body.rewind
14-
if request.body.read == "POSTDATA"
9+
puts "body=#{request.body.string}"
10+
if request.body.string == "POSTDATA"
1511
'OK'
1612
else
1713
'FAIL'

0 commit comments

Comments
 (0)