Skip to content

Commit ddbab8d

Browse files
author
Gaurav Saini
committed
Added Fn-Fdk-Version header to response
1 parent 2a10469 commit ddbab8d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/fdk/context.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def each(&block)
5151
# Represents outbound HTTP headers
5252
class OutHeaders < InHeaders
5353
def initialize(headers, key_in_fn)
54+
headers["Fn-Fdk-Version"] = ["fdk-ruby/#{FDK::VERSION}"]
5455
super(headers, key_in_fn)
5556
end
5657

tests/test_fdk.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def test_handle_simple_request()
6666
assert_equal 200, resp.code.to_i
6767
assert_equal "\"hello world\"", resp.body
6868
assert_equal "application/json", resp["content-type"]
69+
assert_equal "fdk-ruby/#{FDK::VERSION}", resp["Fn-Fdk-Version"]
6970
}
7071
end
7172

0 commit comments

Comments
 (0)