Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7c5e0b

Browse files
committed
clean up
1 parent cd05aa5 commit f7c5e0b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

app.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ class App < Sinatra::Base
66
end
77

88
get '/get-header' do
9-
puts env['HTTP_X_TEST_HEADER']
10-
puts env['HTTP_X-Test-Header']
11-
puts env.inspect
12-
139
header = env['HTTP_X_TEST_HEADER']
1410
puts "test_header=#{header}"
1511
if header == 'true'
@@ -20,8 +16,9 @@ class App < Sinatra::Base
2016
end
2117

2218
post '/post' do
23-
puts "body=#{request.body.string}"
24-
if request.body.string == "POSTDATA"
19+
postbody = request.body.string
20+
puts "body=#{postbody}"
21+
if postbody == "POSTDATA"
2522
'OK'
2623
else
2724
'FAIL'

0 commit comments

Comments
 (0)