Sha256: 242ab3ed773df769747ce4686e6b07dd9790426aec03100e6184f122e1cb1328

Contents?: true

Size: 961 Bytes

Versions: 16

Compression:

Stored size: 961 Bytes

Contents

# typed: true

module Datadog
  module Transport
    module HTTP
      # Data structure for an HTTP request
      class Env < Hash
        attr_reader \
          :request

        def initialize(request, options = nil)
          @request = request
          merge!(options) unless options.nil?
        end

        def verb
          self[:verb]
        end

        def verb=(value)
          self[:verb] = value
        end

        def path
          self[:path]
        end

        def path=(value)
          self[:path] = value
        end

        def body
          self[:body]
        end

        def body=(value)
          self[:body] = value
        end

        def headers
          self[:headers] ||= {}
        end

        def headers=(value)
          self[:headers] = value
        end

        def form
          self[:form] ||= {}
        end

        def form=(value)
          self[:form] = value
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.8.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.7.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.6.1 lib/ddtrace/transport/http/env.rb
ddtrace-1.6.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.5.2 lib/ddtrace/transport/http/env.rb
ddtrace-1.5.1 lib/ddtrace/transport/http/env.rb
ddtrace-1.5.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.4.2 lib/ddtrace/transport/http/env.rb
ddtrace-1.4.1 lib/ddtrace/transport/http/env.rb
ddtrace-1.4.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.3.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.2.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.1.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.0.0 lib/ddtrace/transport/http/env.rb
ddtrace-1.0.0.beta2 lib/ddtrace/transport/http/env.rb