File: response_x_header_formatter.rb

package info (click to toggle)
ruby-gh 0.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,644 kB
  • sloc: ruby: 1,793; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 296 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

require 'faraday/logging/formatter'

module GH
  class ResponseXHeaderFormatter < Faraday::Logging::Formatter
    def request(env); end

    def response(env)
      info('Response') { env.response_headers.select { |k, _v| k =~ /^x-/ }.sort.to_h }
    end
  end
end