Class: Chef::HTTP::RemoteRequestID

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/http/remote_request_id.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ RemoteRequestID

Returns a new instance of RemoteRequestID.



24
# File 'lib/chef/http/remote_request_id.rb', line 24

def initialize(opts = {}); end

Instance Method Details

#handle_request(method, url, headers = {}, data = false) ⇒ Object



26
27
28
29
# File 'lib/chef/http/remote_request_id.rb', line 26

def handle_request(method, url, headers = {}, data = false)
  headers["X-REMOTE-REQUEST-ID"] = Chef::RequestID.instance.request_id
  [method, url, headers, data]
end

#handle_response(http_response, rest_request, return_value) ⇒ Object



31
32
33
# File 'lib/chef/http/remote_request_id.rb', line 31

def handle_response(http_response, rest_request, return_value)
  [http_response, rest_request, return_value]
end

#handle_stream_complete(http_response, rest_request, return_value) ⇒ Object



39
40
41
# File 'lib/chef/http/remote_request_id.rb', line 39

def handle_stream_complete(http_response, rest_request, return_value)
  [http_response, rest_request, return_value]
end

#stream_response_handler(response) ⇒ Object



35
36
37
# File 'lib/chef/http/remote_request_id.rb', line 35

def stream_response_handler(response)
  nil
end