Module: Contrast::Api::Decorators::HttpRequest::ClassMethods

Includes:
Components::Interface
Defined in:
lib/contrast/api/decorators/http_request.rb

Overview

Used to add class methods to the ApplicationUpdate class on inclusion of the decorator

Instance Method Summary collapse

Methods included from Components::Interface

included

Instance Method Details

#build(request) ⇒ Contrast::Api::Dtm::HttpRequest

Convert our Request into a DTM



120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/contrast/api/decorators/http_request.rb', line 120

def build request
  with_contrast_scope do
    msg = new
    msg.uuid = Contrast::Utils::StringUtils.force_utf8(__id__)
    msg.timestamp_ms = Contrast::Utils::Timer.now_ms.to_i

    msg.append_addresses(request)
    msg.append_connection(request)
    msg.append_params(request)
    msg.append_headers(request)
    msg.append_body(request)
    msg
  end
end