Sha256: f92e8c3fa6a567932c5616a86429bd97f4cee3860845971a2553b52e0edebaf7

Contents?: true

Size: 651 Bytes

Versions: 21

Compression:

Stored size: 651 Bytes

Contents

require 'forwardable'
require 'ddtrace/transport/response'

module Datadog
  module Transport
    module HTTP
      # Wraps an HTTP response from an adapter.
      #
      # Used by endpoints to wrap responses from adapters with
      # fields or behavior that's specific to that endpoint.
      module Response
        extend ::Forwardable

        def initialize(http_response)
          @http_response = http_response
        end

        def_delegators :@http_response, *Datadog::Transport::Response.instance_methods

        def code
          @http_response.respond_to?(:code) ? @http_response.code : nil
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ddtrace-0.51.1 lib/ddtrace/transport/http/response.rb
ddtrace-0.51.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.50.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.49.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.48.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.47.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.46.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.45.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.44.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.43.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.42.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.41.0 lib/ddtrace/transport/http/response.rb
ls-trace-0.2.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.40.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.39.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.38.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.37.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.36.0 lib/ddtrace/transport/http/response.rb
ddtrace-0.35.2 lib/ddtrace/transport/http/response.rb
ddtrace-0.35.1 lib/ddtrace/transport/http/response.rb