diff options
author | Ahmet Demir <ahmet2mir+gitlab@gmail.com> | 2018-06-28 06:10:51 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-06-28 06:10:51 +0000 |
commit | 80f4e7575e99c4dfe1cf7a6ccf1b055e7654be4b (patch) | |
tree | c28f6e7a6f174980e77a61ece8f60a74634f0020 /lib/api/helpers | |
parent | a17d0527bed2117e2998312ad749477712827681 (diff) | |
download | gitlab-ce-80f4e7575e99c4dfe1cf7a6ccf1b055e7654be4b.tar.gz |
Add SHA256 and HEAD on File API
Diffstat (limited to 'lib/api/helpers')
-rw-r--r-- | lib/api/helpers/headers_helpers.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/api/helpers/headers_helpers.rb b/lib/api/helpers/headers_helpers.rb new file mode 100644 index 00000000000..cde51fccc62 --- /dev/null +++ b/lib/api/helpers/headers_helpers.rb @@ -0,0 +1,11 @@ +module API + module Helpers + module HeadersHelpers + def set_http_headers(header_data) + header_data.each do |key, value| + header "X-Gitlab-#{key.to_s.split('_').collect(&:capitalize).join('-')}", value + end + end + end + end +end |