Module: Skylight::Formatters::HTTP

Defined in:
lib/skylight/formatters/http.rb

Class Method Summary collapse

Class Method Details

.build_opts(method, scheme, host, port, path, query) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/skylight/formatters/http.rb', line 4

def self.build_opts(method, scheme, host, port, path, query)
  { category: "api.http.#{method.downcase}",
    title:    "#{method.upcase} #{host}",
    annotations: {
      method: method.upcase,
      scheme: scheme,
      host:   host,
      port:   port ? port.to_i : nil,
      path:   path,
      query:  query }}
end