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

Skip to content

Commit db331df

Browse files
committed
test with headers
1 parent 80ecac0 commit db331df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app.rb

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

88
get '/get-header' do
9-
puts "test_header=#{headers['X-Test-Header']}"
10-
if headers['X-Test-Header'] == 'true'
9+
header = env['X_TEST_HEADER']
10+
puts "test_header=#{header}"
11+
if header == 'true'
1112
'OK'
1213
else
1314
'FAIL'

0 commit comments

Comments
 (0)